Closed hayday100 closed 5 years ago
It should be "_thread". The underscore is missing.
I get the same error. How to handle it? Where do I need to change to "_thread" ? Please help me @hayday100 I need this for my Bachelor Thesis. I would be so thankful!
Did you find a fix to it? Where to change "_thread" at?
The Node-RED flow is deployed and connection nodes shows 'connected'. However, when I ran the notebook in Watson Studio, the Websocket (last line) reports:
start_websocket_listener()
--- request header --- GET /ws/orchestrate HTTP/1.1 Upgrade: websocket Connection: Upgrade Host: nao-cognitive-robot-flow.us-south.cf.appdomain.cloud Origin: http://nao-cognitive-robot-flow.us-south.cf.appdomain.cloud Sec-WebSocket-Key: otyk73u0X4BJDO5jCPto0w== Sec-WebSocket-Version: 13
--- response header --- HTTP/1.1 101 Switching Protocols Connection: Upgrade Sec-WebSocket-Accept: lmUag2UMAEb9gr6U9lP8i0RAT4U= Date: Thu, 28 Feb 2019 20:02:03 GMT X-Global-Transaction-ID: 126384467 Upgrade: websocket
error from callback <function on_open at 0x7fb1923aa950>: name 'thread' is not defined File "/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/websocket/_app.py", line 345, in _callback callback(self, *args) File "", line 66, in on_open
thread.start_new_thread(run, ())
send: b'\x81\x8e\xb9Y\x89B\xfd\n\xd1b\xf50\xfa6\xdc7\xa9\x07\xd7='
error from callback <function on_close at 0x7fb1923aaea0>: socket is already closed.
Connection is already closed.
File "/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/websocket/_app.py", line 345, in _callback callback(self, *args) File "", line 57, in on_close
ws.send("DSX Listen End")
File "/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/websocket/_app.py", line 153, in send
if not self.sock or self.sock.send(data, opcode) == 0:
File "/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/websocket/_core.py", line 253, in send
return self.send_frame(frame)
File "/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/websocket/_core.py", line 278, in send_frame
l = self._send(data)
File "/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/websocket/_core.py", line 448, in _send
return send(self.sock, data)
File "/opt/conda/envs/DSX-Python35/lib/python3.5/site-packages/websocket/_socket.py", line 132, in send
raise WebSocketConnectionClosedException("socket is already closed.")