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

Rewrite the database and test chapter for SQLAlchemy 2.x and Flask-SQLAlchemy 3.x #28

Open
greyli opened this issue Mar 2, 2023 · 2 comments
Assignees

Comments

@greyli
Copy link
Member

greyli commented Mar 2, 2023

@greyli greyli self-assigned this Mar 2, 2023
@hanjie-chen
Copy link

当我使用教程中的pip install flask-sqlalchemy==2.5.1时,发生了一些问题,当我下载完成flask-sqlalchemy==2.5.1时,其中几个依赖也同时被安装,如下图所示
截屏2023-04-15 22 49 03
当我试图使用教程中的Pythonn Shell时,发生了如下报错:
截屏2023-04-15 22 50 44
根据我查找资料之后,stack overflow上的这篇文章提示我需要使用flask-sqlalchemy 3.0.x或者更高版本。
推测原因为flask-sqlalchemy-2.5.1和其他的自动下载的一些依赖包会版本不符合,导致依赖包所需要的__all__属性缺失,希望作者可以更新,而非限定死flask-sqlalchemy的版本。

@greyli
Copy link
Member Author

greyli commented Apr 16, 2023

感谢反馈。如果同时固定 SQLAlchemy < 2.0 版本应该就没问题了,即:

pip install flask-sqlalchemy==2.5.1 sqlalchemy==1.4.47

已更新

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