I am trying to run my heroku app locally so that I work on it when I don't have internet. I am able to run the app completely fine on the Heroku website after pushing it however I can't run it locally. When I run heroku local
I get this error in particular:
11:17:19 web.1 | Traceback (most recent call last):
11:17:19 web.1 | File "app.py", line 24, in <module>
11:17:19 web.1 | bottle.run(server='gevent', host='0.0.0.0', port=os.environ.get('PORT', 5000))
11:17:19 web.1 | File "/usr/local/lib/python2.7/site-packages/bottle.py", line 3127, in run
11:17:19 web.1 | server.run(app)
11:17:19 web.1 | File "/usr/local/lib/python2.7/site-packages/bottle.py", line 2907, in run
11:17:19 web.1 | from gevent import wsgi, pywsgi, local
11:17:19 web.1 | ImportError: cannot import name wsgi
11:17:19 web.1 Exited with exit code 1
Please note I have downloaded gevent using pip install gevent
Also I am on a mac version 10.13.5 in case that is relavent
Thanks
gevent.wsgi
was deprecated for years and was finally removed in gevent 1.3. There's an open bottle bug for this problem. Some of your options are:
python -m gevent.pywsgi my_module:my_app
. Or try gunicorngevent.wsgi
simply did from gevent.pywsgi import *
, so anywhere you see wsgi.Thing
just replace it with pywsgi.Thing
.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