启动创建数据库表,

来源:4-10 ORM与CodeFirst区别

Jackeroo

2019-01-10

$ python fisher.py
/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/flask_sqlalchemy/init.py:794: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
Traceback (most recent call last):
File “fisher.py”, line 8, in
app = create_app()
File “/Volumes/Data@SSD/code/python/fisher/app/init.py”, line 18, in create_app
db.create_all(app=app)
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/flask_sqlalchemy/init.py”, line 963, in create_all
self._execute_for_all_tables(app, bind, ‘create_all’)
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/flask_sqlalchemy/init.py”, line 955, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/flask_sqlalchemy/init.py”, line 896, in get_engine
return connector.get_engine()
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/flask_sqlalchemy/init.py”, line 559, in get_engine
self._engine = rv = sqlalchemy.create_engine(info, **options)
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/sqlalchemy/engine/init.py”, line 425, in create_engine
return strategy.create(*args, **kwargs)
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py”, line 57, in create
entrypoint = u._get_entrypoint()
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/sqlalchemy/engine/url.py”, line 156, in _get_entrypoint
cls = registry.load(name)
File “/Volumes/Data@SSD/code/python/fisher/venv/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py”, line 221, in load
(self.group, name))
sqlalchemy.exc.NoSuchModuleError: Can’t load plugin: sqlalchemy.dialects:mysql.cymsql

写回答

1回答

7七月

2019-01-11

你没有装cymysql吧?

0
0

Python Flask高级编程之从0到1开发《鱼书》精品项目

7月老师深入浅出剖析Flask核心机制,和你一起探讨Python高级编程

2778 学习 · 1280 问题

查看课程