Applicable to:
- Plesk for Windows
Symptoms
-
Migration fails to copy website data:
PLESK_INFO: Failed to copy web files for subscription 'example.com'
Migration tools tried to perform operation in 3 attempts: unknown encoding: cp65001 -
Error in Plesk Migrator log
%plesk_dir%var\modules\panel-migrator\sessions\sessionid\debug.log
:CONFIG_TEXT: Exception:
Traceback (most recent call last):
...
File "C:\Program Files (x86)\Plesk\admin\plib\modules\panel-migrator\backend\lib\python\parallels\core\utils\common\__init__.py", line 440, in safe_string_repr
s = str(s).decode(encoding)
LookupError: unknown encoding: cp65001
Cause
Plesk Migrator bug PMT-4448 which will be fixed in future updates.
Resolution
- Connect to the target server via RDP
-
Open PowerShell via Start > Windows PowerShell.
-
Download the quick fix from the article attachments:
PS [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
PS Invoke-WebRequest -URI https://plesk.zendesk.com/hc/article_attachments/360007063114/__init__.zip -OutFile __init__.zip -
Unpack the downloaded fix:
PS Add-Type -Assembly "System.IO.Compression.FileSystem"
PS [System.IO.Compression.ZipFile]::ExtractToDirectory(($pwd).path + "\__init__.zip", ($pwd).path) -
Create a backup of the
%plesk_dir%admin\plib\modules\panel-migrator\backend\lib\python\parallels\core\utils\common\__init__.py
file:PS Move-Item -Path $env:plesk_dir\admin\plib\modules\panel-migrator\backend\lib\python\parallels\core\utils\common\__init__.py $env:plesk_dir\admin\plib\modules\panel-migrator\backend\lib\python\parallels\core\utils\common\__init__.py.bkp
-
Copy the fixed
__init__.py
file to the%plesk_dir%admin\plib\modules\panel-migrator\backend\lib\python\parallels\core\utils\common
folder:PS Move-Item -Path .\__init__.py $env:plesk_dir\admin\plib\modules\panel-migrator\backend\lib\python\parallels\core\utils\common\
-
Re-sync the affected subscription(s)
Comments
2 comments
Damn.
I went through this plesk problem not migrating the sites.
What a catastrophic mistake for a cross-server migration
Sad that plesk is not always reliable after all these years
There were two bugs in the migration tool and luckily there were already articles to help.
Thanks a lot, this article was much needed
Here is a List Of Supported Encoding. You can Use Your preferred encoding from It. Some of the most used encodings are utf-8, asci, latin-1 and utf-32. You can use it like below.
Please sign in to leave a comment.