Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when running example project #65

Closed
antgel opened this issue Aug 3, 2014 · 1 comment
Closed

Errors when running example project #65

antgel opened this issue Aug 3, 2014 · 1 comment

Comments

@antgel
Copy link

antgel commented Aug 3, 2014

I saw this error in the app that I was writing, and only after a while banging my head against the wall, realized that it wasn't a problem in my code. The same error happens when running the example project. Very grateful for any insight. Following are the console errors, with the browser console errors at the end.

• [ThinkPad-R61:~/anan/git/anan/customer-web/django/example_project] antony (socketio) $ python /home/antony/virtualenvs/env1/lib/python2.7/site-packages/django
_socketio/example_project/manage.py runserver_socketio

SocketIOServer running on 127.0.0.1:9000

FAILED to start flash policy server: [Errno 13] Permission denied: ('0.0.0.0', 843)
Traceback (most recent call last):
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../gevent/greenlet.py", line 327, in run
result = self._run(_self.args, *_self.kwargs)
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../socketio/server.py", line 49, in handle
handler.handle()
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../gevent/pywsgi.py", line 184, in handle
result = self.handle_one_request()
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../gevent/pywsgi.py", line 321, in handle_one_request
self.handle_one_response()
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../socketio/handler.py", line 58, in handle_one_response
self.handle_one_response(call_wsgi_app=False)
TypeError: handle_one_response() got an unexpected keyword argument 'call_wsgi_app'
<Greenlet at 0x7f63728ba690: <bound method SocketIOServer.handle of <SocketIOServer at 0x7f63735b2fd0 fileno=5 address=127.0.0.1:9000>>(<socket at 0x7f63728a8d50 fileno=[Errno 9] Bad fil, ('127.0.0.1', 52757))> failed with TypeError

127.0.0.1 - - [2014-08-03 03:35:15] "GET / HTTP/1.1" 200 1233 0.023364
127.0.0.1 - - [2014-08-03 03:35:16] "GET /static/css/chat.css HTTP/1.1" 200 900 0.007484
127.0.0.1 - - [2014-08-03 03:35:29] "GET /asdasd HTTP/1.1" 200 2761 0.013064
127.0.0.1 - - [2014-08-03 03:35:29] "GET /static/css/chat.css HTTP/1.1" 200 900 0.001331
127.0.0.1 - - [2014-08-03 03:35:29] "GET /static/js/socket.io.js HTTP/1.1" 200 64468 0.067194
127.0.0.1 - - [2014-08-03 03:35:29] "GET /static/js/chat.js HTTP/1.1" 200 3239 0.013320
Traceback (most recent call last):
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../gevent/greenlet.py", line 327, in run
result = self._run(_self.args, *_self.kwargs)
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../socketio/server.py", line 49, in handle
handler.handle()
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../gevent/pywsgi.py", line 184, in handle
result = self.handle_one_request()
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../gevent/pywsgi.py", line 321, in handle_one_request
self.handle_one_response()
File "/home/antony/virtualenvs/env1/lib/python2.7/site-packages/django_socketio/example_project/../../socketio/handler.py", line 58, in handle_one_response
self.handle_one_response(call_wsgi_app=False)
TypeError: handle_one_response() got an unexpected keyword argument 'call_wsgi_app'
<Greenlet at 0x7f6371e040f0: <bound method SocketIOServer.handle of <SocketIOServer at 0x7f63735b2fd0 fileno=5 address=127.0.0.1:9000>>(<socket at 0x7f6371dfd110 fileno=[Errno 9] Bad fil, ('127.0.0.1', 52764))> failed with TypeError

Browser errors:
WebSocket connection to 'ws://localhost:9000/socket.io/websocket' failed: Connection closed before receiving a handshake response socket.io.js:395
GET http://localhost:9000/socket.io/xhr-polling//1407054935109 net::ERR_EMPTY_RESPONSE socket.io.js:653

@stephenmcd
Copy link
Owner

This looks like the APIs have changed in some of the dependencies (gevent, gevent-websocket), and while we pin the top-level dependency in django-socketio (namely gevent-socketio==0.2.1), it does not pin its exact dependencies, so newer versions of those dependencies end up getting installed, which triggers the above errors.

I'm just noting this info down for anyone else who hits this and wants to know what's going on. I'm actually going to close this issue as a duplicate of #19 - the big "upgrade" ticket clearly documented at the very start of the project / README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants