question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker image: no module named 'gevent.wsgi'

See original GitHub issue
$ docker run -it --rm -p 9004:9004 coleifer/scout
Traceback (most recent call last):
  File "/srv/server.py", line 14, in <module>
    from gevent.wsgi import WSGIServer
ModuleNotFoundError: No module named 'gevent.wsgi'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
coleifercommented, Dec 9, 2019

Ahh! Thanks, I appreciate you pointing that out. I’ve pushed a new image and committed changes as well so it should be working.

0reactions
fabrixxmcommented, Dec 9, 2019
$ docker run -it --rm -p 9004:9004 coleifer/scout
Unable to find image 'coleifer/scout:latest' locally
latest: Pulling from coleifer/scout
5d20c808ce19: Pull complete
7fe10f100437: Pull complete
22f847861baf: Pull complete
e93e748c3c8b: Pull complete
Digest: sha256:9336bd3cc28b7c98687ceb76ea229a4ab2a97aac4e15999449ada7db850e2835
Status: Downloaded newer image for coleifer/scout:latest
Traceback (most recent call last):
  File "/srv/server.py", line 14, in <module>
    from gevent.wsgi import WSGIServer
ModuleNotFoundError: No module named 'gevent.wsgi'

The code try to import WSGIServer from gevent.wsgi module , but gevent’s docs say that WSGIServer is in gevent.pywsgi module

and indeed:

$ docker run --rm -it -p 9004:9004/tcp --entrypoint /bin/sh coleifer/scout 
/data # python3
Python 3.6.8 (default, Apr 22 2019, 10:24:07) 
[GCC 6.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gevent
>>> from gevent.wsgi import WSGIServer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'gevent.wsgi'
>>> from gevent.pywsgi import WSGIServer
>>> 
Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'gevent.wsgi'
Try using: from gevent.pywsgi import WSGIServer. Instead of: from gevent.wsgi import WSGIServer.
Read more >
How to use Flask with gevent (uWSGI and Gunicorn editions)
Deploy Flask application using gevent.pywsgi ... The fastest way to unleash the power of gevent is to use its built-in WSGI-server called gevent....
Read more >
deploying django 'No module named 'app_name'' - Reddit
hello. i'm trying to deploy my django application and when I run gunicorn, i get an importerror exception on one of my apps....
Read more >
WSGI Servers - Full Stack Python
A Web Server Gateway Interface (WSGI) server runs Python code to create a web application. Learn more about WSGI servers on Full Stack...
Read more >
Python - ModuleNotFoundError: No module named 'Image'
imageimage-processingocrpython. I am getting the following error: ModuleNotFoundError: No module named 'Image'. while running the below script for OCR:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found