Bug #105772 import mssql to mysql codec can't encode character '\ufffd' in position
Submitted: 2 Dec 2021 12:21 Modified: 28 Dec 2021 12:49
Reporter: renato gallo Email Updates:
Status: Need Feedback Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S1 (Critical)
Version:8.0 OS:Microsoft Windows
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: codec can't encode character '\ufffd' in position 4426: character maps to <undef

[2 Dec 2021 12:21] renato gallo
Description:
trying to import mssql db to mysql
in create schemas

Starting...
Create Script File...

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\workbench\wizard_progress_page_widget.py", line 71, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration_schema_creation.py", line 188, in _create_script_task
    self.main.plan.createTargetScript(self.main.plan.state.objectCreationParams["CreateSQLFile"])
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration.py", line 527, in createTargetScript
    grt.modules.DbMySQLFE.createScriptForCatalogObjects(path, self.migrationTarget.catalog, self.state.objectCreationParams)
SystemError: UnicodeEncodeError("'charmap' codec can't encode character '\ufffd' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects
ERROR: Error during Create Script File: UnicodeEncodeError("'charmap' codec can't encode character '\ufffd' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects
ERROR: Exception in task 'Create Script File': SystemError('UnicodeEncodeError("\'charmap\' codec can\'t encode character \'\\ufffd\' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects')

Failed

Starting...
Create Script File...

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\workbench\wizard_progress_page_widget.py", line 71, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration_schema_creation.py", line 188, in _create_script_task
    self.main.plan.createTargetScript(self.main.plan.state.objectCreationParams["CreateSQLFile"])
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration.py", line 527, in createTargetScript
    grt.modules.DbMySQLFE.createScriptForCatalogObjects(path, self.migrationTarget.catalog, self.state.objectCreationParams)
SystemError: UnicodeEncodeError("'charmap' codec can't encode character '\ufffd' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects
ERROR: Error during Create Script File: UnicodeEncodeError("'charmap' codec can't encode character '\ufffd' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects
ERROR: Exception in task 'Create Script File': SystemError('UnicodeEncodeError("\'charmap\' codec can\'t encode character \'\\ufffd\' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects')

Failed

Starting...
Create Script File...

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\workbench\wizard_progress_page_widget.py", line 71, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration_schema_creation.py", line 188, in _create_script_task
    self.main.plan.createTargetScript(self.main.plan.state.objectCreationParams["CreateSQLFile"])
  File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration.py", line 527, in createTargetScript
    grt.modules.DbMySQLFE.createScriptForCatalogObjects(path, self.migrationTarget.catalog, self.state.objectCreationParams)
SystemError: UnicodeEncodeError("'charmap' codec can't encode character '\ufffd' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects
ERROR: Error during Create Script File: UnicodeEncodeError("'charmap' codec can't encode character '\ufffd' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects
ERROR: Exception in task 'Create Script File': SystemError('UnicodeEncodeError("\'charmap\' codec can\'t encode character \'\\ufffd\' in position 4426: character maps to <undefined>"): error calling Python module function DbMySQLFE.createScriptForCatalogObjects')

Failed

How to repeat:
click on migration

connect to the source mssql db
connect to the target mysql db
follow the steps
the error appears in create schemas

Suggested fix:
please find the way to encode the character '\ufffd'
[28 Dec 2021 12:49] MySQL Verification Team
Hello renato gallo,

Thank you for the bug report.
Could you please provide sample database to reproduce this issue at our end?

Regards,
Ashwini Patil