【问题标题】:Error running heroku local在本地运行 heroku 时出错
【发布时间】:2015-11-24 13:43:10
【问题描述】:

请问您是否知道我在使用 heroku 本地命令时遇到的这个错误,感谢您的帮助。我的目标只是创建我的第一个 django 项目以在线部署。 xD

cmd:heroku 本地

(venv_heroku) C:\Python27\venv_heroku\heroku-django\test_app>heroku local 
    forego | starting web.1 on port 5000
    web.1  | '"C:\Users\Raguine\AppData\Roaming\Microsoft\Windows\IEUpdate\logagent.exe"' is not recognized as an internal or external command, 
    web.1  | Traceback (most recent call last):

我已经安装了所有东西和要求,我希望 :D。 这是我安装的依赖项。我希望没有遗漏任何东西。

dj-database-url==0.3.0
dj-static==0.0.6
Django==1.7.10
django-toolbelt==0.0.1
gunicorn==19.3.0
psycopg2==2.5.2
static3==0.6.1

这是我的 .gitignore 文件

venv
 *.pyc
staticfiles

这是我的Procfile看起来像

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

虽然我的 settings.pywsgi.py 是从我所关注的指南中复制粘贴的。来自heroku网站:

https://devcenter.heroku.com/articles/getting-started-with-django

(对不起,因为我只是这里的新手。:D)

请帮帮我。

PS:我正在使用 Python (2.7.9)virtualenv (13.1.2)heroku(heroku si 在我的cmd) 安装并在环境变量中声明它。

C:\Program Files (x86)\Heroku\bin

【问题讨论】:

  • 我的 logagent.exe 有问题吗?是被感染了还是木马病毒? T.T
  • 你绝对应该运行防病毒程序,并在谷歌上搜索如何删除这个特定的蠕虫。
  • 我的防病毒软件是 Microsoft Security Essentials 并且是最新的。我已经扫描了logagent.exe的文件夹(它所在的文件夹),但它没有文件或任何病毒。
  • 问题真的跑题了,但你的机器肯定有问题。

标签: python django heroku local


【解决方案1】:

如果您的项目根目录下还没有Procfile.windows,请使用该名称创建一个文件。将以下行添加到文件中。

web: python manage.py runserver 0.0.0.0:5000

在本地运行heroku时,使用以下命令

heroku local -f Procfile.windows

https://devcenter.heroku.com/articles/getting-started-with-python#declare-app-dependencies

【讨论】:

    猜你喜欢
    • 2012-07-22
    • 2015-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-21
    • 2014-12-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多