I am trying to push my project into heroku and I am following these instructions:
https://devcenter.heroku.com/articles/getting-started-with-django
I am currently stuck on the part the says foreman start
I get this error: --> full error http://dpaste.com/3Y213Y2
(boothie.0.1)MTVL1289dd026:HerokuBoothie bli1$ foreman start
14:59:05 web.1 | started with pid 58353
14:59:05 web.1 | [2014-12-09 14:59:05 -0800] [58353] [INFO] Starting gunicorn 19.1.1
14:59:05 web.1 | [2014-12-09 14:59:05 -0800] [58353] [INFO] Listening at: http://0.0.0.0:5000 (58353)
14:59:05 web.1 | [2014-12-09 14:59:05 -0800] [58353] [INFO] Using worker: sync
14:59:05 web.1 | [2014-12-09 14:59:05 -0800] [58356] [INFO] Booting worker with pid: 58356
14:59:05 web.1 | [2014-12-09 14:59:05 -0800] [58356] [ERROR] Exception in worker process:
14:59:05 web.1 | Traceback (most recent call last):
14:59:05 web.1 | File "/Users/bli1/Development/Django/HerokuBoothie/boothie.0.1/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
14:59:05 web.1 | worker.init_process()
14:59:05 web.1 | File "/Users/bli1/Development/Django/HerokuBoothie/boothie.0.1/lib/python2.7/site-packages/gunicorn/workers/base.py", line 114, in init_process
14:59:05 web.1 | self.wsgi = self.app.wsgi()
14:59:05 web.1 | File "/Users/bli1/Development/Django/HerokuBoothie/boothie.0.1/lib/python2.7/site-packages/gunicorn/app/base.py", line 66, in wsgi
14:59:05 web.1 | self.callable = self.load()
14:59:05 web.1 | File "/Users/bli1/Development/Django/HerokuBoothie/boothie.0.1/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
14:59:05 web.1 | return self.load_wsgiapp()
14:59:05 web.1 | File "/Users/bli1/Development/Django/HerokuBoothie/boothie.0.1/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
14:59:05 web.1 | return util.import_app(self.app_uri)
14:59:05 web.1 | File "/Users/bli1/Development/Django/HerokuBoothie/boothie.0.1/lib/python2.7/site-packages/gunicorn/util.py", line 356, in import_app
14:59:05 web.1 | __import__(module)
14:59:05 web.1 | ImportError: No module named HerokuBoothie.wsgi
Here is a picture of my project structure. The project is located inside a directory called HerokuBoothie
.
Profile:
web: gunicorn HerokuBoothie.wsgi --log-file -
I think it's caused by your project structure; if you follow the heroku tutorial onto the point you have error (foreman start
part), your directory structure would look like this:
hellodjango/
manage.py
Procfile
hellodjango/
__init__.py
settings.py
urls.py
wsgi.py
venv/
bin/
include/
lib/
You can see the structure you have is a bit different, there's an additional HerokuBoothie
directory in your structure. I think restructure your project (something like mv ~/Development/Django/HerokuBoothie/HerokuBoothie/* ~/Development/Django/HerokuBoothie
and remove the empty HerokuBoothie
dir) would solve this issue, but you might have to change some codes if you use absolute paths in your codes.
You have to set the pythonpath
as your HerokuBoothie
module is located in another folder:
web: gunicorn HerokuBoothie.wsgi --pythonpath ../HerokuBoothie --log-file -
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With