这是什么问题啊

来源:4-5 删改部分文件完成项目初始模板

慕运维6045466

2019-11-03

/Users/k.macro/djpro/zanhu/venv/lib/python3.7/site-packages/environ/environ.py:639: UserWarning: Error reading /Users/k.macro/djpro/zanhu/.env - if you’re not configuring your environment separately, check this.
“environment separately, check this.” % env_file)
Traceback (most recent call last):
File “/Users/k.macro/djpro/zanhu/venv/lib/python3.7/site-packages/environ/environ.py”, line 273, in get_value
value = self.ENVIRON[var]
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py”, line 678, in getitem
raise KeyError(key) from None
KeyError: ‘DJANGO_EMAIL_HOST’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/k.macro/djpro/zanhu/manage.py”, line 30, in
execute_from_command_line(sys.argv)
File “/Users/k.macro/djpro/zanhu/venv/lib/python3.7/site-packages/django/core/management/init.py”, line 381, in execute_from_command_line
utility.execute()
File “/Users/k.macro/djpro/zanhu/venv/lib/python3.7/site-packages/django/core/management/init.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/Users/k.macro/djpro/zanhu/venv/lib/python3.7/site-packages/django/core/management/init.py”, line 224, in fetch_command
klass = load_command_class(app_name, subcommand)
File “/Users/k.macro/djpro/zanhu/venv/lib/python3.7/site-packages/django/core/management/init.py”, line 36, in load_command_class
module = import_module(’%s.management.commands.%s’ % (app_name, name))
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

Process finished with exit code 1

写回答

2回答

慕运维6045466

提问者

2019-11-04

.env文件位置放错了,之前没注意大

0
1
JERRY
怎么解决的 我都绝对路径了还是报这个
2020-02-28
共1条回复

Jack

2019-11-04

您好,不要慌。这是什么命令,哪一个步骤出的错呢?能否提供更多信息

0
0

Django高级实战 开发企业级问答网站

融合Django高级用法/算法/设计模式/TestCase测试/云计算打造项目

900 学习 · 756 问题

查看课程