已有184人关注
e起去旅行网站 python manage.py db init 报错
发表在Python图书答疑 2021-05-31 《Python从入门到项目实践》第29章 e起去旅行网站
是否精华
版块置顶:

(venv) D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel>python manage.py db init

Traceback (most recent call last):

  File "manage.py", line 3, in <module>

    from app.models import *

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\app\models.py", line 5, in <module>

    class User(db.Model):

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\flask_sqlalche

my\model.py", line 67, in __init__

    super(NameMetaMixin, cls).__init__(name, bases, d)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\flask_sqlalche

my\model.py", line 121, in __init__

    super(BindMetaMixin, cls).__init__(name, bases, d)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\orm

\decl_api.py", line 72, in __init__

    _as_declarative(reg, cls, dict_)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\orm

\decl_base.py", line 126, in _as_declarative

    return _MapperConfig.setup_mapping(registry, cls, dict_, None, {})

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\orm

\decl_base.py", line 177, in setup_mapping

    return cfg_cls(registry, cls_, dict_, table, mapper_kw)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\orm

\decl_base.py", line 310, in __init__

    self._setup_table(table)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\orm

\decl_base.py", line 803, in _setup_table

    **table_kw

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\flask_sqlalche

my\model.py", line 99, in __table_cls__

    return sa.Table(*args, **kwargs)

  File "<string>", line 2, in __new__

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\uti

l\deprecations.py", line 298, in warned

    return fn(*args, **kwargs)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\sql

\schema.py", line 600, in __new__

    metadata._remove_table(name, schema)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\uti

l\langhelpers.py", line 72, in __exit__

    with_traceback=exc_tb,

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\uti

l\compat.py", line 207, in raise_

    raise exception

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\sql

\schema.py", line 595, in __new__

    table._init(name, metadata, *args, **kw)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\sql

\schema.py", line 664, in _init

    self._extra_kwargs(**kwargs)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\sql

\schema.py", line 800, in _extra_kwargs

    self._validate_dialect_kwargs(kwargs)

  File "D:\PycharmProjects\python_Introduction\python_Introduction\code\29\Travel\venv\lib\site-packages\sqlalchemy\sql

\base.py", line 416, in _validate_dialect_kwargs

    "named <dialectname>_<argument>, got '%s'" % k

TypeError: Additional arguments should be named <dialectname>_<argument>, got 'useexisting'


分享到:
精彩评论 1
孑孓_1622457848
学分:8 LV1
2021-05-31
沙发

Package            Version

------------------ --------

alembic            1.6.5

click              8.0.1

colorama           0.4.4

dataclasses        0.8

Flask              2.0.1

Flask-Migrate      3.0.0

Flask-Script       2.0.6

Flask-SQLAlchemy   2.5.1

Flask-WTF          0.15.1

greenlet           1.1.0

importlib-metadata 4.3.1

itsdangerous       2.0.1

Jinja2             3.0.1

Mako               1.1.4

MarkupSafe         2.0.1

pip                21.1.2

PyMySQL            1.0.2

python-dateutil    2.8.1

python-editor      1.0.4

setuptools         56.0.0

six                1.16.0

SQLAlchemy         1.4.17

typing-extensions  3.10.0.0

Werkzeug           2.0.1

wheel              0.36.2

WTForms            2.3.3

zipp               3.4.1

首页上一页 1 下一页尾页 1 条记录 1/1页
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照