Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named wsgi

This is what I have in my Procfile:

web: gunicorn --pythonpath meraki meraki.wsgi

and when I do foreman start, I get this error:

gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

the reason, as far as I can see in the traceback, is:

ImportError: No module named wsgi

I did import wsgi in the shell and the import was successful, no errors.

Why can't I start foreman?

Project Structure:

meraki
  meraki
      //other apps
      meraki
          settings
          __init__.py
          celery.py
          views.py
          wsgi.py
      manage.py
  Procfile
  requirements
  requirements.txt
like image 491
Jahongir Rahmonov Avatar asked Nov 22 '25 05:11

Jahongir Rahmonov


1 Answers

You've confused yourself by following an unnecessarily complicated structure. You don't need that outer meraki directory, and your Procfile and requirements.txt should be in the same directory as manage.py. Then you can remove the pythonpath parameter and all should be well.

like image 114
Daniel Roseman Avatar answered Nov 24 '25 22:11

Daniel Roseman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!