Closed andyz168 closed 1 year ago
看到env.py 走的online ,是走离线还是在线的 但是没找到在哪里配置 config = context.config
尝试使用
alembic upgrade e660f34b820d --sql
走的离线模式,更新也报错了
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
看到env.py 走的online ,是走离线还是在线的 但是没找到在哪里配置 config = context.config
找到问题了,使用命令sqlalchemy.url 读取的文件地址是paddlelabel/alembic.ini该文件配置的sqlalchemy.url 这个地址是没改的, 但是程序运行的时候不是取这里,所以运行程序或者调试的时候是看不出问题。
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
数据库路径是对的,有这个数据库,并且调试能读取写入 INFO [paddlelabel.config.19]: Database path: sqlite:///C:\Users\andyz.quacheckweb\quacheckweb.db 使用下面的命令报错