请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Python manage.py makemigrations 报错


报错提示如图
我下载的模版是仓库中的v1.0.2

Traceback (most recent call last):
File “/home/ht/.local/share/virtualenvs/zanhu-IHRAcKWB/lib/python3.6/site-packages/environ/environ.py”, line 273, in get_value
value = self.ENVIRON[var]
File “/home/ht/.local/share/virtualenvs/zanhu-IHRAcKWB/lib/python3.6/os.py”, line 669, in getitem
raise KeyError(key) from None
KeyError: ‘CELERY_BROKER_URL’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “manage.py”, line 31, in
execute_from_command_line(sys.argv)
File “/home/ht/.local/share/virtualenvs/zanhu-IHRAcKWB/lib/python3.6/site-packages/django/core/management/init.py”, line 381, in execute_from_command_line
utility.execute()
File “/home/ht/.local/share/virtualenvs/zanhu-IHRAcKWB/lib/python3.6/site-packages/django/core/management/init.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/home/ht/.local/share/virtualenvs/zanhu-IHRAcKWB/lib/python3.6/site-packages/django/core/management/init.py”, line 224, in fetch_command
klass = load_command_class(app_name, subcommand)
File “/home/ht/.local/share/virtualenvs/zanhu-IHRAcKWB/lib/python3.6/site-packages/django/core/management/init.py”, line 36, in load_command_class
module = import_module(’%s.management.commands.%s’ % (app_name, name))
File “/home/ht/.local/share/virtualenvs/zanhu-IHRAcKWB/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

但如果我用pycharm 用下面的方式直接跑貌似就正常,这是为什么

图片描述

正在回答 回答被采纳积分+3

2回答

Jack 2020-04-16 10:10:34

这报错不像是模板有问题,你是不是很久之前下载的v1.0.2,我三周之前更新过一次。

还有项目路径里面最好不要有中文,“桌面”那个地方;

0 回复 有任何疑惑可以回复我~
Jack 2020-04-15 17:52:06

您好,报错图片能截全吗

0 回复 有任何疑惑可以回复我~
  • 提问者 慕姐0850765 #1
    以附上錯誤訊息
    回复 有任何疑惑可以回复我~ 2020-04-15 20:43:37
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信