2

I'm following the getting started with Python tutorial at Heroku, and I'm stuck at the "Run the app locally" step. I'm on a Windows 7 machine, and I've managed all previous steps successfully. The following code was run in the Git Bash provided by the toolbelt inside a virtualenv as described. The error appears below.

The ProcFile says (as per the instructions)

web: python manage.py runserver 0.0.0.0:$PORT

and the command foreman start web fails with the error depicted below.

If I just enter python manage.py runserver 0.0.0.0:5000 into the prompt, the server starts right up and I can visit the app. Maybe this is sufficient to develop locally, but maybe not, so if anyone can shed some light on what's going on, I'd be grateful. Thank you.

PS: I should also emphasize that as per this step gunicorn was worked out of the requirements, so unlike many questions similar to this, gunicorn is not supposed to be part of the picture.

(venv)John@JOHN-PC ~/python-getting-started (master)
$ foreman start web
16:06:13 web.1  | started with pid 24536
16:06:13 web.1  | Traceback (most recent call last):
16:06:13 web.1  |   File "manage.py", line 10, in <module>
16:06:13 web.1  |     execute_from_command_line(sys.argv)
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\core\management\__init__.py", line 399, in execute_from_command_line
16:06:13 web.1  |     utility.execute()
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\core\management\__init__.py", line 392, in execute
16:06:13 web.1  |     self.fetch_command(subcommand).run_from_argv(self.argv)
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\core\management\base.py", line 242, in run_from_argv
16:06:13 web.1  |     self.execute(*args, **options.__dict__)
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\core\management\base.py", line 280, in execute
16:06:13 web.1  |     translation.activate('en-us')
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\utils\translation\__init__.py", line 130, in activate
16:06:13 web.1  |     return _trans.activate(language)
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\utils\translation\trans_real.py", line 188, in activate
16:06:13 web.1  |     _active.value = translation(language)
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\utils\translation\trans_real.py", line 177, in translation
16:06:13 web.1  |     default_translation = _fetch(settings.LANGUAGE_CODE)
16:06:13 web.1  |   File "c:\Users\John\python-getting-started\venv\lib\site-packages\django\utils\translation\trans_real.py", line 159, in _fetch
16:06:13 web.1  |     app = import_module(appname)
16:06:13 web.1  | exited with code 1
16:06:13 system | sending SIGKILL to all processes
16:06:13        |   File "c:\Users\John\python-getting-started\venv\lib\site -packages\django\utils\importlib.py", line 40, in import_module
rschwieb
  • 746
  • 2
  • 16
  • 41
  • See http://stackoverflow.com/questions/19078939/foreman-installed-by-heroku-toolbelt-on-windows-cant-be-found for a possible workaround on Windows. – Brandon Taylor Dec 11 '14 at 02:23
  • @brandon thanks for the lead. Do you know if it's even necessary to use git bash, or can everything be done through windows prompt? – rschwieb Dec 11 '14 at 04:06
  • I was running everything through Windows prompt, but still had issues, and switched over to Linux. – Brandon Taylor Dec 11 '14 at 05:21
  • @Brandon And did you switch because there was some critical feature you couldn't do without, or simply for convenience? Unfortunately I don't have the option to switch to linux or mac :S – rschwieb Dec 11 '14 at 11:51
  • No, unfortunately I just could never get it to work properly on Windows. – Brandon Taylor Dec 11 '14 at 12:19
  • @Brandon Sigh: so depressing. Thanks for your input. – rschwieb Dec 11 '14 at 13:17

0 Answers0