SyntaxError:Generator表达式必须是parenthezised / python manage.py migrate
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SyntaxError:Generator表达式必须是parenthezised / python manage.py migrate相关的知识,希望对你有一定的参考价值。
我是编程新手,我想跟随Djangogirls教程,但我现在被困了。在教程中,我是here:
要为我们的博客创建数据库,让我们在控制台中运行以下命令:python manage.py migrate(我们需要在包含manage.py文件的djangogirls目录中)。如果情况顺利,你应该看到这样的事情:......
在教程中没有失败的选项,但我有一条错误消息:
(myvenv) C:\Users\Julcsi\djangogirls> python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\core\management\__init__.py",
line 364, in execute_from_command_line
utility.execute()
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\core\management\__init__.py",
line 338, in execute
django.setup()
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\__init__.py",
line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\apps\registry.py",
line 85, in populate
app_config = AppConfig.create(entry)
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\apps\config.py",
line 94, in create
module = import_module(entry)
File "C:\Users\Julcsi\AppData\Local\Programs\Python\Python37\lib\importlib\__init__.py",
line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 723, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_remove
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\contrib\admin\__init__.py",
line 4, in <module>
from django.contrib.admin.filters import (
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\contrib\admin\filters.py",
line 10, in <module>
from django.contrib.admin.options import IncorrectLookupParameters
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\contrib\admin\options.py",
line 12, in <module>
from django.contrib.admin import helpers, widgets
File "C:\Users\Julcsi\djangogirls\myvenv\lib\site-packages\django\contrib\admin\widgets.py",
line 152
'%s=%s' % (k, v) for k, v in params.items(),
SyntaxError: Generator expression must be parenthesized
我究竟做错了什么?我该怎么办?
我有Python 3.7.0b1
非常感谢提前帮助:)
以上是关于SyntaxError:Generator表达式必须是parenthezised / python manage.py migrate的主要内容,如果未能解决你的问题,请参考以下文章
MODX 无限保存 SyntaxError: 预期表达式,得到 '<'
SyntaxError:预期的表达式,得到'<'错误 - vue
反应路由器参数化路由:SyntaxError:预期表达式,得到'<'
SyntaxError: 生成器表达式必须用括号括起来 / python manage.py migrate