【发布时间】:2015-08-06 16:15:21
【问题描述】:
这就是我的Procfile:
web: gunicorn --pythonpath meraki meraki.wsgi
当我执行foreman start 时,我收到此错误:
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
据我在回溯中看到的原因是:
ImportError: No module named wsgi
我在shell中做了import wsgi,导入成功,没有错误。
为什么我不能开始foreman?
项目结构:
meraki
meraki
//other apps
meraki
settings
__init__.py
celery.py
views.py
wsgi.py
manage.py
Procfile
requirements
requirements.txt
【问题讨论】:
-
你能发布你的项目结构吗?
-
为什么要添加pythonpath参数?
-
您是否未能将
__init__.py列为与上述结构中的wsgi.py存在于同一目录中?您必须拥有它才能使其正常工作。这是一个关键文件,如果它确实存在,不列出它,会导致对问题做出许多错误的结论。 -
@GrahamDumpleton 你是对的。我更新了问题。谢谢你:)
标签: python django heroku gunicorn foreman