Articles in this section

Plesk Migrator fails to copy website data: unknown encoding: cp65001

kb: bug Plesk for Windows ext: migrator ABT: Group B

Applicable to:

  • Plesk for Windows
Moved to INTERNAL: According to jira, bug PMT-4448 was fixed in December'22, but article still gets reuse. We need to find a new root cause. Involve Leonid Gukhman

UPDATE: Publish on reuse again, under investigation in 3rd Line https://jira.plesk.ru/browse/PPS-14067 

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

  1. Connect to the target server via RDP
  2. Open PowerShell via Start > Windows PowerShell.

  3. Download the quick fix from the article attachments:

    PS [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    PS Invoke-WebRequest -URI https://support.plesk.com/hc/en-us/article_attachments/12377109034007/__init__.zip -OutFile __init__.zip

  4. Unpack the downloaded fix:

    PS Add-Type -Assembly "System.IO.Compression.FileSystem"

    PS [System.IO.Compression.ZipFile]::ExtractToDirectory(($pwd).path + "\__init__.zip", ($pwd).path)

  5. 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

  6. 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\

  7. Re-sync the affected subscription(s)

Alternative solution: https://jira.plesk.ru/browse/PMT-4448: 1. login to source server console 2. kill all panel-migrator-rpc-agent processes 3. run cmd.exe as administrator 4. type "chcp 437" Enter 5. type "C:\plesk_migrator\rpc-agent\panel-migrator-rpc-agent.exe" Enter 6. go to target server and re run migration

Was this article helpful?

Comments

1 comment
Date Votes
  • Hi, can you confirm if this bug is fixed?

    0

Please sign in to leave a comment.