django-socketio-example icon indicating copy to clipboard operation
django-socketio-example copied to clipboard

KeyError on run_example.py

Open philipn opened this issue 13 years ago • 3 comments

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 avatar Feb 02 '12 03:02 philipn

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"

philipn avatar Feb 02 '12 03:02 philipn

I met the same issue

cheese avatar Sep 03 '12 03:09 cheese

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

sagoyanfisic avatar Jul 13 '16 17:07 sagoyanfisic