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

Incompatible with SQLAlchemy 2.0.0 #33

Closed
Zlopez opened this issue Jan 27, 2023 · 2 comments
Closed

Incompatible with SQLAlchemy 2.0.0 #33

Zlopez opened this issue Jan 27, 2023 · 2 comments

Comments

@Zlopez
Copy link
Collaborator

Zlopez commented Jan 27, 2023

Today I got a automatic PR updating SQLAlchemy to 2.0.0 and the sqlalchemy_schemadisplay stopped working.

Here is the backtrace:

Traceback (most recent call last):
  File "/var/home/zlopez/git/anitya/docs/generate_db_schema", line 29, in <module>
    write_graph('images/database.png')
  File "/var/home/zlopez/git/anitya/docs/generate_db_schema", line 18, in write_graph
    graph = create_schema_graph(
  File "/var/home/zlopez/git/anitya/.tox/docs/lib/python3.10/site-packages/sqlalchemy_schemadisplay.py", line 153, in create_schema_graph
    label=_render_table_html(table, metadata, show_indexes, show_datatypes),
  File "/var/home/zlopez/git/anitya/.tox/docs/lib/python3.10/site-packages/sqlalchemy_schemadisplay.py", line 121, in _render_table_html
    if metadata.bind and isinstance(metadata.bind.dialect, PGDialect):
AttributeError: 'MetaData' object has no attribute 'bind'

The whole script for generation database schema could be found here.

@return42
Copy link

I have the same issue .. BTW are there any plans to build a new release / on pypi there is v1.3 - 2016-01-27

@Zlopez
Copy link
Collaborator Author

Zlopez commented Feb 19, 2024

This is fixed in 2.0 release.

@Zlopez Zlopez closed this as completed Feb 19, 2024
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

Successfully merging a pull request may close this issue.

2 participants