• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Site Import Error UnicodeEncodeError: 'ascii'

maffi

New Pleskian
Server operating system version
Ubuntu 22.04.2 LTS
Plesk version and microupdate number
18.0.51
Hello Community,

unfortunately I always get the following message when using the extension "Site Import". Does anyone have an idea what this could be? I am wondering about the "UnicodeEncodeError: 'ascii' codec can't encode character u'\xa7' in position 7: ordinal not in range(128)":

Failed to copy files of source folder '/var/www/html/www.domain1.de/htdocs/web' to '/var/www/vhosts/domain1.de/httpdocs/' on the target server.
Transfer the folder manually to the target server. [Details ausblenden]
Command execution failed on the local server with non-zero exit code.
command: su admdomain1 --shell /bin/sh -c '/usr/local/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/ftp-migrator/ftp-migrator --config-file -'
exit code: 1
stdout:
stderr: [2023-04-06 15:21:32,807] [INFO] Try to connect to FTP host 'domain1.de'
[2023-04-06 15:21:32,819] [INFO] Successfully connected to FTP host 'domain1.de', host replied: 220 web02.xyz.de
[2023-04-06 15:21:32,819] [INFO] Try to login to FTP host 'domain1.de' with username 'admdomain1'
Traceback (most recent call last):
File "/usr/local/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/ftp-migrator/ftp-migrator", line 5, in <module>
main()
File "/opt/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/ftp-migrator/ftp_migrator/main.py", line 278, in main
config.use_ftps, config.encoding, config.ignore_passive_mode_server_ip
File "/opt/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/ftp-migrator/ftp_migrator/ftp.py", line 50, in __init__
self.connect()
File "/opt/psa/admin/plib/modules/site-import/backend/lib/python/parallels/core/extras/ftp-migrator/ftp_migrator/ftp.py", line 72, in connect
self._ftp.login(self._username, self._password)
File "/opt/plesk/python/2.7/lib/python2.7/ftplib.py", line 682, in login
return FTP.login(self, user, passwd, acct)
File "/opt/plesk/python/2.7/lib/python2.7/ftplib.py", line 395, in login
if resp[0] == '3': resp = self.sendcmd('PASS ' + passwd)
File "/opt/plesk/python/2.7/lib/python2.7/ftplib.py", line 250, in sendcmd
self.putcmd(cmd)
File "/opt/plesk/python/2.7/lib/python2.7/ftplib.py", line 183, in putcmd
self.putline(line)
File "/opt/plesk/python/2.7/lib/python2.7/ftplib.py", line 178, in putline
self.sock.sendall(line)
File "/opt/plesk/python/2.7/lib/python2.7/ssl.py", line 741, in sendall
v = self.send(data[count:])
File "/opt/plesk/python/2.7/lib/python2.7/ssl.py", line 707, in send
v = self._sslobj.write(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa7' in position 7: ordinal not in range(128)
 
This can be caused by an invisible control character that was inserted at the beginning or the end of a file of the website you are trying to import. The correct solution is probably to find the file where the character is in (or the files) and to remove it, then migrate again. Remove: # tr -d '\xa7' < input_file.txt > output_file.txt. But a faster and easier solution is to zip the whole directory, copy it to the target and unzip it.
 
Back
Top