Skip to content

sqlalchemy library changed - import statement throws error #6

@hars-j

Description

@hars-j

Dear creators of pubchem,
I tried to run your code, and it throws the following error:

_/opt/conda/lib/python3.9/site-packages/bio2bel/manager/abstract_manager.py in
12 import click
13 from more_click import verbose_option
---> 14 from sqlalchemy.ext.declarative.api import DeclarativeMeta
15
16 from .cli_manager import CliMixin

ModuleNotFoundError: No module named 'sqlalchemy.ext.declarative.api'_

It would appear that the structure of the sqlalchemy library has changed in the meantime, which messed up your import statement:

https://docs.sqlalchemy.org/en/14/orm/mapping_api.html#sqlalchemy.orm.declarative_base

Changed in version 1.4: The declarative_base() function is now a specialization of the more generic registry class. The function also moves to the sqlalchemy.orm package from the declarative.ext package.

It would be great if you could have a look.
Thanks a lot!
Jesko

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