codysoyland / django-socketio-example

an example of using Django with Socket.IO
http://codysoyland.com/2011/feb/6/evented-django-part-one-socketio-and-gevent/
BSD 3-Clause "New" or "Revised" License
77 stars 23 forks source link

KeyError on run_example.py #3

Open philipn opened 12 years ago

philipn commented 12 years ago

Following the directions, I get:

(env)philip@philip-laptop:~/projects/django/socketio_experiments/django-socketio-example$ ./run_example.py 
Listening on port 9000 and on port 843 (flash policy server)
Traceback (most recent call last):
  File "./run_example.py", line 16, in <module>
    SocketIOServer(('', PORT), application, resource="socket.io").serve_forever()
  File "/home/philip/projects/django/socketio_experiments/env/lib/python2.6/site-packages/socketio/server.py", line 22, in __init__
    self.namespace = kwargs.pop('namespace')
KeyError: 'namespace'
philipn commented 12 years ago

It looks like this is due to the 'resource' argument being renamed 'namespace'. Changing it to 'namespace' makes the keyerror go away, but the client just sits at "Connecting..." forever. I also see an error:

"NetworkError: 500 INTERNAL SERVER ERROR - http://localhost:9000/socket.io/lib/vendor/web-socket-js/WebSocketMain.swf"

cheese commented 12 years ago

I met the same issue

sagoyanfisic commented 8 years ago

Traceback (most recent call last): File "./run_example.py", line 12, in from socketio import SocketIOServer ImportError: cannot import name SocketIOServer