Skip to content

TypeError: unhashable type: 'list' with SQLAlchemy 1.3.11 #180

Description

@Tenzer

SQLAlchemy 1.3.11 was released on Nov 11th and when we upgraded to that we started seeing exceptions like this one:

TypeError: unhashable type: 'list'
  File "unrelated/file/path.py", line 30, in get_table
    table = sa.Table(name, metadata, schema=schema, autoload=True, autoload_with=engine)
  File "<string>", line 2, in __new__
  File "sqlalchemy/util/deprecations.py", line 128, in warned
    return fn(*args, **kwargs)
  File "sqlalchemy/sql/schema.py", line 506, in __new__
    metadata._remove_table(name, schema)
  File "sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "sqlalchemy/util/compat.py", line 153, in reraise
    raise value
  File "sqlalchemy/sql/schema.py", line 501, in __new__
    table._init(name, metadata, *args, **kw)
  File "sqlalchemy/sql/schema.py", line 590, in _init
    self._autoload(
  File "sqlalchemy/sql/schema.py", line 613, in _autoload
    autoload_with.run_callable(
  File "sqlalchemy/engine/base.py", line 2163, in run_callable
    return conn.run_callable(callable_, *args, **kwargs)
  File "sqlalchemy/engine/base.py", line 1615, in run_callable
    return callable_(self, *args, **kwargs)
  File "sqlalchemy/engine/default.py", line 459, in reflecttable
    return insp.reflecttable(
  File "sqlalchemy/engine/reflection.py", line 641, in reflecttable
    for col_d in self.get_columns(
  File "sqlalchemy/engine/reflection.py", line 368, in get_columns
    col_defs = self.dialect.get_columns(
  File "<string>", line 2, in get_columns
  File "sqlalchemy/engine/reflection.py", line 50, in cache
    ret = info_cache.get(key)

I have redacted the file path in the first item in the stack trace.

From what I can see this is related to this change: sqlalchemy/sqlalchemy@b1103f3. I'm however not sure if it's a bug in SQLAlchemy itself or something that is specific to sqlalchemy-redshift, but I thought I would try here first.

Let me know if there's any information you need in order to investigate this further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions