Skip to content

TypeError: unhashable type: 'list' #205

Description

@igor-kremin

in tableprocessor.py
for db in res:
if not res[db]:
# no tables in db, try to add all tables from DB
tables = self.tables_list(db)
res[db].add(tables)
logging.debug("add {} tables to {} db".format(tables, db))
replace to line
res[db].add(tables) => res[db].update(tables)
as self.tables_list(db) returns list object

=============
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/clickhouse_mysql/main.py", line 134, in run
migrator.migrate_all_tables(self.config.is_dst_create_table())
File "/usr/local/lib/python3.12/site-packages/clickhouse_mysql/tablemigrator.py", line 127, in migrate_all_tables
dbs = self.dbs_tables_lists()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/clickhouse_mysql/tableprocessor.py", line 92, in dbs_tables_lists
res[db].add(tables)
TypeError: unhashable type: 'list'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions