已有184人关注
《python 从入门到精通》第22章代码报错
发表在Python图书答疑 2019-12-07 悬赏:1 学分 《Python从入门到项目实践》第29章 e起去旅行网站
是否精华
版块置顶:

457页:运行 python  manage.py db  migrate时报错:

INFO  [alembic.runtime.migration] Context impl MySQLImpl.

INFO  [alembic.runtime.migration] Will assume non-transactional DDL.

Traceback (most recent call last):

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\base.py", line 143, in _catch_revision_

errors

    yield

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\base.py", line 206, in get_revisions

    return self.revision_map.get_revisions(id_)

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\revision.py", line 299, in get_revision

s

    return sum([self.get_revisions(id_elem) for id_elem in id_], ())

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\revision.py", line 299, in <listcomp>

    return sum([self.get_revisions(id_elem) for id_elem in id_], ())

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\revision.py", line 304, in get_revision

s

    for rev_id in resolved_id)

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\revision.py", line 304, in <genexpr>

    for rev_id in resolved_id)

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\revision.py", line 362, in _revision_fo

r_ident

    resolved_id)

alembic.script.revision.ResolutionError: No such revision or branch '423caff1b936'


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

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

    manager.run()

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\flask_script\__init__.py", line 417, in run

    result = self.handle(argv[0], argv[1:])

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\flask_script\__init__.py", line 386, in handle

    res = handle(*args, **config)

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\flask_script\commands.py", line 216, in __call__

    return self.run(*args, **kwargs)

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\flask_migrate\__init__.py", line 197, in migrate

    version_path=version_path, rev_id=rev_id)

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\command.py", line 176, in revision

    script_directory.run_env()

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\script\base.py", line 427, in run_env

    util.load_python_file(self.dir, 'env.py')

  File "C:\Users\ccb\PycharmProjects\Chapter01\Travel\venv\lib\site-packages\alembic\util\pyfiles.py", line 81, in load_python_file


    module = load_module_py(module_id, path)

 

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