带有 Tornado 和 websocket python 连接的 WebSocketPayloadException

WebSocketPayloadException with Tornado and websocket python connection

当通过 websocket 将 compressed/binary 数据从 Tornado 发送回客户端时,这意味着什么?

 File "/usr/lib64/python2.7/site-packages/websocket/_abnf.py", line 380, in extract
    raise WebSocketPayloadException("cannot decode: " + repr(frame.data))
websocket._exceptions.WebSocketPayloadException: cannot decode: "x\x9c\xc5\xcd

这意味着在您的 self.write_message() 调用中设置 binary=True 选项