【发布时间】:2017-07-21 04:07:44
【问题描述】:
我想使用模块autobahn-autoreconnect,它可以在本地与 PyCharm 一起正常工作。我只是用 PyCharm 安装模块并将旧的 ApplicationRunner 行替换为新的:
# from autobahn.asyncio.wamp import ApplicationRunner
from autobahn_autoreconnect import ApplicationRunner
但是当我使用 pip3 install autobahn-autoreconnect 将它安装在 Ubuntu 服务器上然后只使用 import autobahn_autoreconnect 时,我收到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/autobahn_autoreconnect/__init__.py", line 31, in <module>
from autobahn.wamp import protocol
File "/usr/local/lib/python3.5/dist-packages/autobahn/wamp/protocol.py", line 272, in <module>
class ApplicationSession(BaseSession):
File "/usr/local/lib/python3.5/dist-packages/autobahn/wamp/protocol.py", line 277, in ApplicationSession
log = txaio.make_logger()
File "/usr/local/lib/python3.5/dist-packages/txaio/_unframework.py", line 43, in _throw_usage_error
"To use txaio, you must first select a framework "
RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_asyncio()
我做错了什么?
【问题讨论】:
标签: python ubuntu python-import autobahn reconnect