(venv) PS D:\python项目\Travel> python manage.py db
init
Traceback (most recent call last):
File "manage.py", line 3, in <module>
from app.models import *
File "D:\python项目\Travel\app\models.py", line 5
, in <module>
class User(db.Model):
File "D:\python项目\Travel\venv\lib\site-packages
\flask_sqlalchemy\model.py", line 92, in __init__
super().__init__(name, bases, d, **kwargs)
File "D:\python项目\Travel\venv\lib\site-packages
\flask_sqlalchemy\model.py", line 144, in __init__
super().__init__(name, bases, d, **kwargs)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\orm\decl_api.py", line 196, in __init__
_as_declarative(reg, cls, dict_)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\orm\decl_base.py", line 244, in _as_dec
larative
return _MapperConfig.setup_mapping(registry, cl
s, dict_, None, {})
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\orm\decl_base.py", line 325, in setup_m
apping
return _ClassScanMapperConfig(
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\orm\decl_base.py", line 575, in __init_
_
self._setup_table(table)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\orm\decl_base.py", line 1726, in _setup
_table
table_cls(
File "D:\python项目\Travel\venv\lib\site-packages
\flask_sqlalchemy\model.py", line 178, in __table_c
ls__
return sa.Table(*args, **kwargs)
File "<string>", line 2, in __new__
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\util\deprecations.py", line 281, in war
ned
return fn(*args, **kwargs) # type: ignore[no-a
ny-return]
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\sql\schema.py", line 431, in __new__
return cls._new(*args, **kw)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\sql\schema.py", line 486, in _new
metadata._remove_table(name, schema)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\util\langhelpers.py", line 146, in __ex
it__
raise exc_value.with_traceback(exc_tb)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\sql\schema.py", line 481, in _new
table.__init__(name, metadata, *args, _no_init=
False, **kw)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\sql\schema.py", line 855, in __init__
self._extra_kwargs(**kw)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\sql\schema.py", line 1003, in _extra_kw
args
self._validate_dialect_kwargs(kwargs)
File "D:\python项目\Travel\venv\lib\site-packages
\sqlalchemy\sql\base.py", line 596, in _validate_di
alect_kwargs
raise TypeError(
TypeError: Additional arguments should be named <di
alectname>_<argument>, got 'useexisting'
python创建迁移仓库失败,怎么解决
最新推荐文章于 2024-10-30 16:52:22 发布