已有184人关注
智慧星答题测试系统数据库迁移报错
发表在Python图书答疑 2021-10-26 《零基础学Python》第17章 智慧星答题测试系统
是否精华
版块置顶:

(venv) PS D:\Python\Python_study\examination_source_code> python manage.py migrate

Traceback (most recent call last):

  File "D:\Python\Python_study\examination_source_code\manage.py", line 22, in <module>

    execute_from_command_line(sys.argv)

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\core\management\__init__.py", line 363, in execute_from_command_line

    utility.execute()

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\core\management\__init__.py", line 337, in execute

    django.setup()

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\__init__.py", line 27, in setup

    apps.populate(settings.INSTALLED_APPS)

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\apps\registry.py", line 85, in populate

    app_config = AppConfig.create(entry)

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\apps\config.py", line 94, in create

    module = import_module(entry)

  File "c:\users\treeigrass\appdata\local\programs\python\python39\lib\importlib\__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import

  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load

  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked

  File "<frozen importlib._bootstrap_external>", line 855, in exec_module

  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\contrib\admin\__init__.py", line 4, in <module>

    from django.contrib.admin.filters import (

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\contrib\admin\filters.py", line 10, in <module>

    from django.contrib.admin.options import IncorrectLookupParameters

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\contrib\admin\options.py", line 12, in <module>

    from django.contrib.admin import helpers, widgets

  File "D:\Python\Python_study\examination_source_code\venv\lib\site-packages\django\contrib\admin\widgets.py", line 151

    '%s=%s' % (k, v) for k, v in params.items(),

    ^

SyntaxError: Generator expression must be parenthesized


分享到:
精彩评论 1
无语_mrkj
学分:3155 LV11
2021-11-01
沙发

您使用的开发环境都是什么版本的?从提示看是Python版本和Django框架的版本不兼容呢?

首页上一页 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经营性网站备案信息 营业执照