fossasia / knitlib

Knitting backend library for knitting machines
GNU Lesser General Public License v3.0
1.54k stars 14 forks source link

Errors when calling socket callbacks functions on #55

Closed tian2992 closed 9 years ago

tian2992 commented 9 years ago
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/tian/devel/knitlib-webserver/knitlib_webserver.py", line 139, in __emit_socket
    emit(ms["type"], ms["data"], namespace="/knit")
  File "/usr/lib/python2.7/site-packages/flask_socketio/__init__.py", line 444, in emit
    return request.namespace.emit(event, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 338, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 297, in _get_current_object
    return self.__local()
  File "/usr/lib/python2.7/site-packages/flask/globals.py", line 20, in _lookup_req_object
    raise RuntimeError('working outside of request context')
RuntimeError: working outside of request context
tian2992 commented 9 years ago

Fixed with new Socket Arch.