I have tried one of example web-socket client codes in autobahn web site. But it gives me the error
ImportError: No module named twisted.websocket
even though I have already installed autobahn. When I try to install "twisted" explicitly it tells me that "twisted" is already installed. I'm working on a Ubuntu machine.
答案 0 :(得分:0)
您正在尝试导入一个不存在(并且从未拥有)的模块twisted.websocket
。该示例具有模块autobahn.twisted.websocket
,它是高速公路的一部分,而不是扭曲。
答案 1 :(得分:0)
文档似乎已过时/不准确。尝试:
from autobahn.websocket import WebSocketServerProtocol