1

所以我刚刚用 python、virtualenv 和 lpthw.web 创建了我的第一个小网站。当我运行 python bin/app.py 时,我可以去我的浏览器访问 localhost:8080 并且它没有问题。

但是,在设置 Heroku 之后,当我运行 Foreman 时,我得到: ImportError: No Module named hello。

我不知道这是否相关,但我还是尝试将它部署到 heroku,当我输入 heroku open 时,我得到:

  at=error code=H10 desc="App crashed" method=GET path=/ host=arcane-lake- 2908.herokuapp.com fwd="71.20.1.73" dyno= connect= service= status=503 bytes=
  2013-09-03T09:47:58.419844+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=arcane-lake-2908.herokuapp.com fwd="71.20.1.73" dyno=   connect= service= status=503 bytes=
4

3 回答 3

2

我有同样的错误,这是一个简单的修复。看看你的 Procfile。它可能显示类似

web: gunicorn hello:app

您应该替换hello为您的应用程序的名称。

于 2015-04-02T12:31:58.377 回答
0

您需要在设置>已安装的应用程序中添加“hello”模块

于 2013-09-04T03:16:25.723 回答
0

打开你的项目目录,在那里你会找到 settings.py ,你可以看到如下

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles' ,
    '你的应用名称在这里',
)

于 2014-06-16T06:00:20.283 回答