Websocket code works on Windows but not Linux
问题 I'm running the same code; the following works in Windows, but will run correctly on Ubuntu (16.04). import websocket import json class WhatEver(object): def __init__(self): self.ws = websocket.WebSocketApp( 'wss://beijing.51nebula.com/', on_message=self.on_ws_message, on_open=self.on_open ) def rin_forever(self): print("start run forever") self.ws.run_forever() def on_ws_message(self, ws,message): print (message) self.ws.close() def _send_msg(self, params): call = {"id": 1, "method": "call",