Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: MetaData.__init__() got an unexpected keyword argument 'bind' under sqlalchemy 2.0 #410

Closed
karlicoss opened this issue Jan 29, 2023 · 1 comment

Comments

@karlicoss
Copy link

  File "/tmp/home/.local/lib/python3.10/site-packages/dataset/table.py", line 628, in find                                                                                                                                                                                                
    query = self.table.select(whereclause=args, limit=_limit, offset=_offset)                                                                                                                                                                                                             
  File "/tmp/home/.local/lib/python3.10/site-packages/dataset/table.py", line 63, in table                                                                                                                                                                                                
    self._sync_table(())                                                                                                                                                                                                                                                                  
  File "/tmp/home/.local/lib/python3.10/site-packages/dataset/table.py", line 324, in _sync_table                                                                                                                                                                                         
    self._reflect_table()                                                                                                                                                                                                                                                                 
  File "/tmp/home/.local/lib/python3.10/site-packages/dataset/table.py", line 306, in _reflect_table                                                                                                                                                                                      
    self.name, self.db.metadata, schema=self.db.schema, autoload=True                                                                                                                                                                                                                     
  File "/tmp/home/.local/lib/python3.10/site-packages/dataset/database.py", line 109, in metadata                                                                                                                                                                                         
    return MetaData(schema=self.schema, bind=self.executable)                                                                                                                                                                                                                             
TypeError: MetaData.__init__() got an unexpected keyword argument 'bind'

There is a deprecation warning in 1.4 version https://docs.sqlalchemy.org/en/14/core/metadata.html#sqlalchemy.schema.MetaData.bind
And it's gone in 2.0 https://docs.sqlalchemy.org/en/20/core/metadata.html#sqlalchemy.schema.MetaData

@pudo
Copy link
Owner

pudo commented Jan 30, 2023

see #411.

@pudo pudo closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants