Reputation: 98
I'm running:
gevent==0.13.8
gevent-socketio==0.3.5-rc2
gunicorn==18.0
And have run into the following error:
2013-11-05 06:40:00 [5671] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/home/vagrant/server/lib/python2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
worker.init_process()
File "/home/vagrant/server/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 165, in init_process
super(GeventWorker, self).init_process()
File "/home/vagrant/server/lib/python2.7/site-packages/gunicorn/workers/base.py", line 112, in init_process
self.run()
File "/home/vagrant/server/lib/python2.7/site-packages/socketio/sgunicorn.py", line 14, in run
self.socket.setblocking(1)
AttributeError: 'GeventSocketIOWorker' object has no attribute 'socket'
A previous stack overflow question has the solution "downgrade to version 16.0"
GeventSocketIOWorker has no attribute 'socket'
However I'm reluctant to do this because additions in v18.0 are really useful to me.
I'm asking here because I'm not sure if there's an easy solution that I'm missing. If not I imagine I'll need to raise a ticket for gunicorn?
Upvotes: 0
Views: 213
Reputation: 98
It was a version thing.
gevent-socketio version 0.3.5-rc2 was uploaded to Pypi in July 2012. The fix for this issue came out in Jan 2013.
I solved it by using the master branch from the gevent-socketio repository on GitHub. To do this, change the line for gevent-socketio in requirements.txt to
-e [email protected]:abourget/gevent-socketio.git#egg=gevent_socketio
Upvotes: 0