Giter Club home page Giter Club logo

Comments (3)

nickstenning avatar nickstenning commented on August 16, 2024

Thanks for reporting this. It should be pretty easy to fix — I'll try and get to it soon. 

Out of interest, can I ask why you're using honcho on Heroku rather than using Heroku's native Procfile support?

On Mon, Apr 1, 2013 at 7:07 PM, Radek Dostál [email protected]
wrote:

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.
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

Reply to this email directly or view it on GitHub:
#33

from honcho.

dasty avatar dasty commented on August 16, 2024

Thank you very much for offering the fix!!!

Out of interest, can I ask why you're using honcho on Heroku rather than using Heroku's native Procfile support?

Of course: I am just being cheap during development and I am running multiple processes within one Dyno using approach described at http://heyman.info/2012/dec/6/heroku-multiple-processes-single-dyno-with-foreman/ with one modification. I did not want to be mix ruby and python, so I rather decided to use honcho than foreman.

Thanks,
Radek

from honcho.

pombredanne avatar pombredanne commented on August 16, 2024

FWIW, the same issue existed on Windows and there was a tiny fix just for this here:

default=os.environ['USERNAME' if compat.ON_WINDOWS else 'USER'],

But frankly it puzzles me as to why a modern posix shell would not have USER defined... though this is a possibility and I wonder is using LOGNAME as fallback if USER is not there would work, possibly on Heroku too.
This thread shed some light on the topic: http://www.unix.com/shell-programming-scripting/152400-unix-user-logname-environment-variables.html
Samba for instance tests both: USER then LOGNAME: http://www.samba.org/samba/docs/man/manpages-3/smbclient.1.html

from honcho.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.