Your comment was added to the bug successfully.
| Bug #102532 | MySQL workbench migration wizard erre “not supported between instances of 'int' | ||
|---|---|---|---|
| Submitted: | 8 Feb 2021 17:28 | Modified: | 19 Mar 2021 12:11 |
| Reporter: | Ali Bad | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | MySQL Workbench: Migration | Severity: | S3 (Non-critical) |
| Version: | OS: | Ubuntu (20.04) | |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[19 Feb 2021 12:11]
MySQL Verification Team
Hello Ali Bad, Thank you for the bug report. Could you please provide SQL script to create the PostgreSQL stuff so we could try to migrate it? Thanks. Regards, Ashwini Patil
[20 Mar 2021 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".
[13 May 2021 8:10]
Mitja Hrastnik
I have encountered the same problem. I finally tracked it down to this line in "db_generic_migration_grt.py". My stack trace is below:
Traceback:
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_postgresql_migration_grt.py", line 313, in migrateCatalog
return instance.migrateCatalog(state, source_catalog)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 182, in migrateCatalog
targetSchema = self.migrateSchema(state, sourceSchema, target_catalog)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 218, in migrateSchema
self.migrateSchemaContents(state, targetSchema, sourceSchema)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 234, in migrateSchemaContents
target_table = self.migrateTableToMySQL(state, source_table, targetSchema)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_sql92_migration_grt.py", line 36, in migrateTableToMySQL
targetTable = super(Sql92Migration, self).migrateTableToMySQL(state, sourceTable, targetSchema)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 285, in migrateTableToMySQL
targetIndex = self.migrateTableIndexToMySQL(state, sourceIndex, targetTable)
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\db_generic_migration_grt.py", line 424, in migrateTableIndexToMySQL
prefix_length_limit = min(referenced_index_col.length, MYSQL_MAX_INDEX_KEY_LENGTH_INNODB_UTF8) if referenced_index_col.length > 0 else MYSQL_MAX_INDEX_KEY_LENGTH_INNODB_UTF8
NameError: '>' not supported between instances of 'NoneType' and 'int'
00:43:23 [ERR][ Wizard]: Thread 'Migrate Selected Objects' failed: TypeError("'>' not supported between instances of 'NoneType' and 'int'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
All of the offending columns have had the "text" type and were primary keys. I believe this is related to this StackOverflow discussion: https://stackoverflow.com/questions/1827063/mysql-error-key-specification-without-a-key-le...
I fixed the problem by catching the errors in the Python file above and assigning MYSQL_MAX_INDEX_KEY_LENGTH_INNODB_UTF8 as the prefix_length_limit in those cases. Not pretty, but it worked so I could migrate the data over.
[29 Aug 2021 16:43]
Vasu Rao
Hi Ali,
I am unable to understand this solution. I am also getting same issue.
I checked in last file and the entry it was there .Then what i should add in the file which you mentioned.
Traceback (most recent call last):
File "C:\Program Files\MySQL\MySQL Workbench 8.0\workbench\wizard_progress_page_widget.py", line 190, in thread_work
self.func()
File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration_object_migration.py", line 110, in task_migrate
self.main.plan.migrate()
File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\migration.py", line 503, in migrate
self.migrationTarget.catalog = self.migrationSource.migration.migrateCatalog(self.state, self.migrationSource.catalog)
SystemError: TypeError("'>' not supported between instances of 'NoneType' and 'int'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
ERROR: Migrate Selected Objects: TypeError("'>' not supported between instances of 'NoneType' and 'int'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
Failed
[21 Apr 2024 1:56]
Jordan Holberg
Hey, Mitja Hrastnik, could you post your code changes? I've encountered the exact same error, but am not a Python guy.
[9 Apr 14:07]
venkateswara rao motupalli
I'm having exactly this same error while trying to convert a PostgreSQL Database (Catalogue with 13 tables) into MySQL DB.
Source : PostgreSQL 16.8 on x86_64-pc-linux-gnu
Target : 8.0.41 MySQL Community Server - GPL
Error as below. Can someone let know what is the exact fix for this pls ?
Traceback (most recent call last):
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\workbench\wizard_progress_page_widget.py", line 198, in thread_work
self.func()
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration_object_migration.py", line 118, in task_migrate
self.main.plan.migrate()
File "C:\Program Files\MySQL\MySQL Workbench 8.0 CE\modules\migration.py", line 511, in migrate
self.migrationTarget.catalog = self.migrationSource.migration.migrateCatalog(self.state, self.migrationSource.catalog)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
ERROR: Migrate Selected Objects: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog
Failed

Description: I'm trying to use MySQL workbench migration wizard beetwen postgresql and my sql, But in migration step i have this error: Traceback (most recent call last): File "/usr/share/mysql-workbench/libraries/workbench/wizard_progress_page_widget.py", line 197, in thread_work self.func() File "/usr/lib/mysql-workbench/modules/migration_object_migration.py", line 117, in task_migrate self.main.plan.migrate() File "/usr/lib/mysql-workbench/modules/migration.py", line 510, in migrate self.migrationTarget.catalog = self.migrationSource.migration.migrateCatalog(self.state, self.migrationSource.catalog) SystemError: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog ERROR: Migrate Selected Objects: TypeError("'<=' not supported between instances of 'int' and 'NoneType'"): error calling Python module function DbPostgresqlMigration.migrateCatalog Failed How to repeat: anytime