Comments (6)
In a possibly related issue, when someone disconnects in Pyramid (using the simple_pyramid_chat example), this traceback is output in console:
Traceback (most recent call last):
File "/home/raj/_env/lib/python2.7/site-packages/gevent/greenlet.py", line 390, in run
result = self._run(*self.args, **self.kwargs)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/router.py", line 187, in __call__
response = self.handle_request(request)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/config/views.py", line 352, in rendered_view
context)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/renderers.py", line 396, in render_view
return self.render_to_response(response, system, request=request)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/renderers.py", line 426, in render_to_response
result = self.render(value, system_values, request=request)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/renderers.py", line 422, in render
result = renderer(value, system_values)
File "/home/raj/_env/lib/python2.7/site-packages/pyramid/mako_templating.py", line 176, in __call__
raise ValueError('renderer was passed non-dictionary as value')
ValueError: renderer was passed non-dictionary as value
<Greenlet at 0x23ee050: <pyramid.router.Router object at 0x235dd10>({'bfg.routes.matchdict': {'remaining': (u'1', u'we, <function <lambda> at 0x2360938>)> failed with ValueError
from gevent-socketio.
Exceptions still present with socket.io client 0.9.9. Apparently they changed something in 0.9.7 that doesn't agree with gevent-socketio.
from gevent-socketio.
I'm closing this voluntarily, as I don't think the traceback is gevent-socketio's fault. Despite being able to resolve the bug by rolling back to an earlier version of the socket.io client (around v0.9.6), I suspect that what is really needed is better conditional checking in my Django view that handles the websocket request:
retval = None
if 'socketio' in request.environ:
retval = socketio_manage(request.environ, ns_dict, request)
return HttpResponse(retval)
from gevent-socketio.
This still happend. I have last versions of everything, and get in python:
127.0.0.1 - - [28/Dec/2012 15:14:46] "GET /socket.io/1/?t=1356725685834 HTTP/1.1
" 500 -
Traceback (most recent call last):
File "c:\Programacion\Python\27\lib\site-packages\flask\app.py", line 1701, in
__call__
return self.wsgi_app(environ, start_response)
File "c:\Programacion\Python\27\lib\site-packages\flask\app.py", line 1689, in
wsgi_app
response = self.make_response(self.handle_exception(e))
File "c:\Programacion\Python\27\lib\site-packages\flask\app.py", line 1687, in
wsgi_app
response = self.full_dispatch_request()
File "c:\Programacion\Python\27\lib\site-packages\flask\app.py", line 1360, in
full_dispatch_request
rv = self.handle_user_exception(e)
File "c:\Programacion\Python\27\lib\site-packages\flask\app.py", line 1358, in
full_dispatch_request
rv = self.dispatch_request()
File "c:\Programacion\Python\27\lib\site-packages\flask\app.py", line 1344, in
dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "c:\Proyectos\TeleportServer\teleport.py", line 85, in run_socketio
socketio_manage(request.environ, {'/teleport': TeleportNamespace}, request)
File "c:\Programacion\Python\27\lib\site-packages\socketio\__init__.py", line
67, in socketio_manage
socket = environ['socketio']
KeyError: 'socketio'
And in javascript:
GET http://localhost:5000/socket.io/1/?t=1356725685834 500 (INTERNAL SERVER ERROR) socket.io.js:2
d.handshake socket.io.js:2
d.connect socket.io.js:2
d socket.io.js:2
c.connect socket.io.js:2
(anonymous function) main.js:45
k jquery-1.8.2.min.js:2
l.fireWith jquery-1.8.2.min.js:2
p.extend.ready jquery-1.8.2.min.js:2
D
This is trying to use flask + gevent. Running with app.run() this happend, however using:
ws = SocketIOServer(('0.0.0.0', WEB_PORT),
SharedDataMiddleware(app, {}),
resource="socket.io",
policy_server=False)
ws.serve_forever()
Works, but break flask...
from gevent-socketio.
When disconnecting socketio.io calls an URL like /socket.io/1//209329135415/?disconnect=1
which gevent-socketio doesn't seem to handle correctly... Don't see right now where this functionality should be implemented?
from gevent-socketio.
This is still happening for me, even with the sample apps (at least the pyramid chat one). It's not on disconnect requests, it's on all requests. Downgrading the socket.io client to 0.9.something makes the problem go away.
from gevent-socketio.
Related Issues (20)
- How to broadcast data to a room (of socket io) when the server receives data from somewhere else (not using socket io)
- headers use integer for Access-Control-Max-Age HOT 1
- GeventSocketIOWorker fails to boot when used with gunicorn and ssl flags
- WebSocket is closed before the connection is established. HOT 1
- gevent UnicodeError HOT 3
- django.utils.importlib is removed in Django 1.9 HOT 1
- Merge working tests MR and ask people to rebase
- About renaming the "socketio" library name
- BaseNamespace.session
- SSL Error
- Django 1.10 Support
- django example won't install
- WebSocketError: Received "Socket is dead".
- My chat room sometimes the user sends the text all become?????
- how to run socket.io chat app from two different ports
- Tag 668d11edbd62052cde1583be1e1d0512c930f16d as 0.3.6?
- Release 0.3.7 with post-0.3.6 fixes? HOT 1
- Is it possible to use gevent-socketio as a socket.io client? HOT 1
- KeyError: 'socketio' in socketio_manager
- Version compatability issue on Executing Tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gevent-socketio.