【发布时间】:2012-10-23 22:52:35
【问题描述】:
对我的 django 应用程序提交了一个小的代码更改并部署到 heroku。该应用程序现在在每个响应上都会引发 H10(应用程序崩溃)错误。当我检查日志时,我看到了..
[web.1]: Traceback (most recent call last):
[web.1]: File "nightlife2/manage.py", line 2, in <module>
[web.1]: from django.core.management import execute_manager
[web.1]: ImportError: No module named django.core.management
[web.1]: bash: bin/gunicorn_django: No such file or directory
..我知道这意味着 django 不在 pythonpath 上。我查看了 heroku 配置上的 PATH,上面写着bin:/usr/local/bin:/usr/bin:/bin。但是在执行heroku run bash 时,我注意到整个bin 目录现在已经消失了。我在 heroku 上部署的其他应用程序仍然可以推送到 bin 目录(我相信较新的应用程序不再有 bin 目录,它现在在 .heroku/venv/bin 中。不是 100% 确定那里有详细信息)
有人遇到过这种情况吗?我可以将 PATH 更改为.heroku/venv/bin,但随后我收到关于 sql 的错误,我不知道这是否离根本问题更近或更远。任何事情都将不胜感激,因为这是生产服务器,目前正在冲洗。
编辑:更改路径时的错误是:django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3
。数据库是postgress,所以我不确定这是从哪里来的
【问题讨论】: