带有Tornado和websocket python连接的WebSocketPayloadException

时间:2015-06-02 17:19:11

标签: python websocket tornado

通过websocket将压缩/二进制数据从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

1 个答案:

答案 0 :(得分:1)

这意味着在self.write_message()调用

中设置binary = True选项