You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to use this component, but, sometimes (really random - most of time, it works fine), when my app restarts, it gives me this error (gevent and asyncio, doesn't matter, tried both):
'AsyncioWebSocket' object has no attribute 'before_request_funcs' AttributeError("'AsyncioWebSocket' object has no attribute 'before_request_funcs'",)
File "core/init/flask.py", line 74, in <module>
File "/usr/lib64/python3.4/site-packages/flask/app.py", line 62, in wrapper_func
return f(self, *args, **kwargs)
File "/usr/lib64/python3.4/site-packages/flask_uwsgi_websocket/websocket.py", line 162, in register_blueprint
blueprint.register(self, options, first_registration)
File "/usr/lib64/python3.4/site-packages/flask/blueprints.py", line 153, in register
deferred(state)
File "/usr/lib64/python3.4/site-packages/flask/blueprints.py", line 128, in wrapper
func(state)
File "/usr/lib64/python3.4/site-packages/flask/blueprints.py", line 273, in <lambda>
self.record_once(lambda s: s.app.before_request_funcs
The code I used to init websockets is:
WebSockets = None # Just load websockets if really needed
if bp_websockets:
try:
from flask.ext.uwsgi_websocket import GeventWebSocket as Sockets
WebSockets = Sockets(app)
for bp, prefixo in bp_websockets:
print(' Registrando o blueprint WebSocket', prefixo)
# The error occurs in this line.
WebSockets.register_blueprint(bp, url_prefix=prefixo)
except exception as E:
from traceback import format_tb
from sys import exc_info
print('*** Erro ao configurar websockets', E, repr(E))
print(''.join(format_tb(exc_info()[2])))
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to use this component, but, sometimes (really random - most of time, it works fine), when my app restarts, it gives me this error (gevent and asyncio, doesn't matter, tried both):
The code I used to init websockets is:
The text was updated successfully, but these errors were encountered: