2017-03-01 7 views
0

モジュールautobahn-autoreconnectを使用したいが、それはPyCharmでローカルで正常に動作する。私はPyCharmでモジュールをちょうどをインストールし、新しいものと古いApplicationRunnerライン交換:Python:import autobahn_autoreconnectによりRuntimeErrorが発生する

# 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() 

私は間違っていますか?

答えて

0

以下の解決策が私に役立ちました。

まず:

import txaio 
txaio.use_asyncio() 

第二:

from autobahn_autoreconnect import ApplicationRunner 
関連する問題