2024-05-11 14:19:57 发布
网友
在对我的repo进行一些更改并部署到heroku之后,我收到以下错误:
importorror:没有名为site的模块
我不知道是什么导致了这个问题,因为我只在最后两次提交中更改了一些Django模板。
致意
Heroku对此有一篇文章:https://help.heroku.com/BWJ7QYTF/why-am-i-seeing-importerror-no-module-named-site-when-deploying-a-python-app
Python构建包的更新意味着应用程序上设置的PYTHONPATH和PYTHONHOME配置变量可能会引入此问题。
Firstly, check if these are present withheroku configTo fix the issue, you can unset them like so:heroku config:unset PYTHONHOME -a appnameheroku config:unset PYTHONPATH -a appname
Firstly, check if these are present with
heroku config
To fix the issue, you can unset them like so:
heroku config:unset PYTHONHOME -a appname
heroku config:unset PYTHONPATH -a appname
我有一个很相似的问题,我能解决。也许是同样的问题?
Heroku app crashed after pushing small change. Very confused
看看你的程序文件。它应该显示如下内容:
web: gunicorn site:app
确保site是应用程序的名称。
site
Heroku对此有一篇文章:https://help.heroku.com/BWJ7QYTF/why-am-i-seeing-importerror-no-module-named-site-when-deploying-a-python-app
Python构建包的更新意味着应用程序上设置的PYTHONPATH和PYTHONHOME配置变量可能会引入此问题。
我有一个很相似的问题,我能解决。也许是同样的问题?
Heroku app crashed after pushing small change. Very confused
看看你的程序文件。它应该显示如下内容:
确保
site
是应用程序的名称。相关问题 更多 >
编程相关推荐