Bug #71239 utf16 conversion error in db_mssql_grt.py
Submitted: 27 Dec 2013 21:27 Modified: 20 Feb 2014 11:02
Reporter: Frederic Viennot Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S2 (Serious)
Version:6.0.8 OS:Other (Windows 7)
Assigned to: CPU Architecture:Any
Tags: db_mssql_grt.py, utf16

[27 Dec 2013 21:27] Frederic Viennot
Description:
This is a similar issue than #67180 but with version 6.0.8.

The migration tool fails on the "Reverse engineer selected schemata" step with a python error decoding UTF16.

- Retrieving table dbo.uniUnit...

Traceback (most recent call last):

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\db_mssql_grt.py", line 384, in reverseEngineer

    reverseEngineerTables(connection, schema)

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\db_mssql_grt.py", line 556, in reverseEngineerTables

    reverseEngineerTableColumns(connection, table)

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\db_mssql_grt.py", line 616, in reverseEngineerTableColumns

    for row in rows:

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\db_mssql_grt.py", line 130, in <lambda>

    con.add_output_converter(-150, lambda value: value if value is None else value.decode('utf-16'))

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\Python\Lib\encodings\utf_16.py", line 16, in decode

    return codecs.utf_16_decode(input, errors, True)

UnicodeDecodeError: 'utf16' codec can't decode byte 0x29 in position 86: truncated data

Traceback (most recent call last):

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\workbench\wizard_progress_page_widget.py", line 192, in thread_work

    self.func()

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\migration_schema_selection.py", line 160, in task_reveng

    self.main.plan.migrationSource.reverseEngineer()

  File "C:\Program Files (x86)\MySQL\MySQL Workbench 6.0 CE\modules\migration.py", line 353, in reverseEngineer

    self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)

SystemError: UnicodeDecodeError("'utf16' codec can't decode byte 0x29 in position 86: truncated data"): error calling Python module function DbMssqlRE.reverseEngineer

ERROR: Reverse engineer selected schemata: UnicodeDecodeError("'utf16' codec can't decode byte 0x29 in position 86: truncated data"): error calling Python module function DbMssqlRE.reverseEngineer

Failed

How to repeat:
I usually picked "Only one schema" from the "Schemata Selection" page, but I tried the others, too.
[20 Jan 2014 11:02] MySQL Verification Team
Thank you for the bug report. Please check for related/duplicate of http://bugs.mysql.com/bug.php?id=67180 . Thanks.
[21 Feb 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".