Skip to content

AttributeError: module 'sqlalchemy' has no attribute '__all__'. Did you mean: '__file__'? #50

@nianqinianyi

Description

@nianqinianyi

versions:
python==3.10

PyMySQL==1.1.0
SQLAlchemy==2.0.20
flask-sqlacodegen==2.0.0

error command:
flask-sqlacodegen 'mysql+pymysql://username:password@ip:port/db' --outfile './models.py'

success command:
flask-sqlacodegen 'mysql+pymysql://username:password@ip:port/db' --outfile './models.py' --flask

I want generator the models without flask, so I remove the param '--flask', but it has errors.

when I user old versions of SQLAlchemy, the command run successfully:
PyMySQL==0.9.3
SQLAlchemy==1.3.17
flask-sqlacodegen==1.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions