1

I'm trying to execute flask app with socket-io, using gevent, but receive error on start:

uwsgi[23312]: WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x5645e3bee6a0 pid: 23312 (default app)
uwsgi[23312]: spawned uWSGI master process (pid: 23312)
uwsgi[23312]: spawned uWSGI worker 1 (pid: 23315, cores: 1024)
uwsgi[23312]: spawned uWSGI worker 2 (pid: 23316, cores: 1024)
uwsgi[23312]: spawned uWSGI worker 3 (pid: 23317, cores: 1024)
uwsgi[23312]: spawned uWSGI worker 4 (pid: 23318, cores: 1024)
uwsgi[23312]: spawned uWSGI worker 5 (pid: 23319, cores: 1024)
uwsgi[23312]: spawned uWSGI worker 6 (pid: 23320, cores: 1024)
uwsgi[23312]: spawned uWSGI worker 7 (pid: 23321, cores: 1024)
uwsgi[23312]: *** running gevent loop engine [addr:0x5645e2778d30] ***
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: spawned uWSGI worker 8 (pid: 23322, cores: 1024)
uwsgi[23312]: spawned uWSGI worker 9 (pid: 23323, cores: 1024)
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: spawned uWSGI worker 10 (pid: 23324, cores: 1024)
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable
uwsgi[23312]: TypeError: 'module' object is not callable

my uwsgi_conf.ini is simple and only this lines matter:

http-websockets = true
http-socket = :1234
chmod-socket = 660
gevent = 1024

when i remove gevent line everything works correct without TypeError: 'module' object is not callable error

also i have 1:1 copy of this project on another server where everything run perfectly

UPDATE-1: gevent-early-monkey-patch = 1 if i remove this line i got different error:

Respawned uWSGI worker 1 (new pid: 26039)
DAMN ! worker 3 (pid: 26030) died :( trying respawn ...

1 Answer 1

1

Well when i install pip install gevent==1.4.0

everything works perfectly, instead of new one gevent version

Sign up to request clarification or add additional context in comments.

1 Comment

I have also noticed that the latest gevent works fine with Python 3.7, but shows the error with 3.8.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.