【问题标题】:gunicorn modul not found django heroku找不到gunicorn模块 django heroku
【发布时间】:2018-12-06 03:52:13
【问题描述】:

第一次部署到heroku。我部署了测试应用程序,并且很好地运行了迁移。但是,我收到以下错误

ModuleNotFoundError: No module named 'djorg2'

我运行 heroku logs --tail 并在这里得到以下结果

这是我的文件路径的图片

这是我当前的 Procfile

web: gunicorn djorg2.wsgi --log-file -

我对在 heroku 上进行部署有点陌生。有谁知道我的问题可能是什么和/或计数指向正确的方向。在一个下午的大部分时间里,我一直在尝试解决这个问题,但我有点卡住了。

【问题讨论】:

  • 您是否在practice 文件夹上运行该命令。如果不是这就是原因。

标签: python django heroku gunicorn


【解决方案1】:
web: gunicorn practice.djorg2.wsgi --log-file -

【讨论】:

    【解决方案2】:

    感谢大家的提示。我有一种感觉,这可能是由于文件放置。我重新组织了我的文件,以便一切都在我的 git repo 的根目录下,现在它工作正常。

    我想从现在开始,我会将所有内容放在自己的文件位置,以便更有条理,不要让自己感到困惑。我试过了

    web: gunicorn practice.djorg2.wsgi --log-file -
    

    但由于某些奇怪的原因,它不起作用。

    【讨论】:

      猜你喜欢
      • 2021-08-20
      • 1970-01-01
      • 2019-02-18
      • 2018-08-20
      • 2015-05-09
      • 2015-05-12
      • 2015-09-21
      • 2021-04-12
      相关资源
      最近更新 更多