Skip to content

Honcho fails on Heroku because, USER variable is not set #33

@dasty

Description

@dasty

Tested version: 0.4.0

Steps to reproduce: run Honcho on Heroku, for example by putting "web: honcho -f ProcfileHoncho start" into your Procfile and "honcho==0.4.0" into your requirements.txt.

Actual behaviour: following error message is printed into heroku log:

2013-04-01T17:31:29+00:00 heroku[web.1]: State changed from crashed to starting
2013-04-01T17:31:48+00:00 heroku[web.1]: Starting process with command `honcho -f ProcfileHoncho start`
2013-04-01T17:31:49+00:00 app[web.1]:     load_entry_point('honcho==0.4.0', 'console_scripts', 'honcho')()
2013-04-01T17:31:49+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/pkg_resources.py", line 337, in load_entry_point
2013-04-01T17:31:49+00:00 app[web.1]:     return get_distribution(dist).load_entry_point(group, name)
2013-04-01T17:31:49+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/pkg_resources.py", line 2279, in load_entry_point
2013-04-01T17:31:49+00:00 app[web.1]:     return ep.load()
2013-04-01T17:31:49+00:00 app[web.1]: Traceback (most recent call last):
2013-04-01T17:31:49+00:00 app[web.1]:   File "/app/.heroku/python/bin/honcho", line 9, in <module>
2013-04-01T17:31:49+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/pkg_resources.py", line 1989, in load
2013-04-01T17:31:49+00:00 app[web.1]:     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
2013-04-01T17:31:49+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/honcho/command.py", line 66, in <module>
2013-04-01T17:31:49+00:00 app[web.1]:     class Honcho(object):
2013-04-01T17:31:49+00:00 app[web.1]:     default=os.environ['USERNAME' if compat.ON_WINDOWS else 'USER'],
2013-04-01T17:31:49+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/honcho/command.py", line 205, in Honcho
2013-04-01T17:31:49+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/UserDict.py", line 23, in __getitem__
2013-04-01T17:31:49+00:00 app[web.1]:     raise KeyError(key)
2013-04-01T17:31:49+00:00 app[web.1]: KeyError: 'USER'
2013-04-01T17:31:50+00:00 heroku[web.1]: Process exited with status 1
2013-04-01T17:31:50+00:00 heroku[web.1]: State changed from starting to crashed

Expected behaviour: tasks defined in ProcfileHoncho are started correctly

Temporary workaround: define USER variable on heroku:

heroku config:set USER=heroku

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions