key-error: 'socketio' in gevent-socketio + django chat app implementation

363 views Asked by At

I was trying to implement the example of gevent-socketio django chat app from the official git repository. With python 2.7.6, django 1.9.2 and socket.io 1.4.5. @https://github.com/abourget/gevent-socketio/tree/master/examples/django_chat. The Server runs but I cant get any server-client connection. I have run the server from different browsers and tried to send message between them. But there were never any connection. Instead whenever I try to connect from a browser I get this error

ERROR Exception while handling socketio connection Traceback (most recent call last):

File "/home/razon/gevent-socketio/socketio/sdjango.py", line 66, in socketio socketio_manage(request.environ, SOCKETIO_NS, request) File "/home/razon/gevent-socketio/socketio/init.py", line 67, in socketio_manage socket = environ['socketio'] KeyError: 'socketio'

Either suggest me any solution or suggest me any other reliable platform to bind with django so that I can implement a real time multiplayer card game with realtime chatting. Thank you in advance. :)

1

There are 1 answers

0
lo__on On

Are you perhaps not using the gevent server? I got the same error message in Pyramid with another server.

From the Github page:

Note: you need to use the gevent python WSGI server to use gevent-socketio.