Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在linux上运行autobahn python会出现异常。AttributeError:路由器实例没有属性';经纪人';_Python_Linux_Twisted_Autobahn - Fatal编程技术网

在linux上运行autobahn python会出现异常。AttributeError:路由器实例没有属性';经纪人';

在linux上运行autobahn python会出现异常。AttributeError:路由器实例没有属性';经纪人';,python,linux,twisted,autobahn,Python,Linux,Twisted,Autobahn,我正在尝试在linux机器(ubuntu服务器64位)上使用twisted运行autobahn WAMP应用程序 我确实注意到,在开发/测试时,我需要在使用wamp.Application之后安装pywin32,但这在linux环境中当然不可用 以前我一直在这台机器上运行autobahn websocket程序,但现在切换到使用autobahn.twisted.wamp.Application时出现此错误 任何有助于解决这个问题,使我可以得到应用程序运行将是有益的 我的进口是: from twi

我正在尝试在linux机器(ubuntu服务器64位)上使用twisted运行autobahn WAMP应用程序

我确实注意到,在开发/测试时,我需要在使用wamp.Application之后安装pywin32,但这在linux环境中当然不可用

以前我一直在这台机器上运行autobahn websocket程序,但现在切换到使用autobahn.twisted.wamp.Application时出现此错误

任何有助于解决这个问题,使我可以得到应用程序运行将是有益的

我的进口是:

from twisted.internet.defer import returnValue
from autobahn.twisted.wamp import Application
我得到以下堆栈跟踪:

2014-08-23 09:54:15+1200 [WampWebSocketServerProtocol,0,127.0.0.1] RX WAMP HELLO
 Message (realm = realm1, roles = [<autobahn.wamp.role.RoleSubscriberFeatures in
stance at 0x9bd79ec>, <autobahn.wamp.role.RolePublisherFeatures instance at 0x9b
d7aec>, <autobahn.wamp.role.RoleCallerFeatures instance at 0x9bd7b6c>, <autobahn
.wamp.role.RoleCalleeFeatures instance at 0x9bd7fac>], authmethods = None, authi
d = None)
2014-08-23 09:54:15+1200 [WampWebSocketServerProtocol,0,127.0.0.1] Unhandled err
or in Deferred:
2014-08-23 09:54:15+1200 [WampWebSocketServerProtocol,0,127.0.0.1] Unhandled Err
or
        Traceback (most recent call last):
          File "/usr/local/lib/python2.7/dist-packages/autobahn/wamp/websocket.p
y", line 90, in onMessage
            self._session.onMessage(msg)
          File "/usr/local/lib/python2.7/dist-packages/autobahn/wamp/protocol.py
", line 1267, in onMessage
            self._add_future_callbacks(d, success, failed)
          File "/usr/local/lib/python2.7/dist-packages/autobahn/twisted/wamp.py"
, line 72, in _add_future_callbacks
            return future.addCallbacks(callback, errback)
          File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py
", line 295, in addCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py
", line 577, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/local/lib/python2.7/dist-packages/autobahn/wamp/protocol.py
", line 1250, in success
            welcome(self._realm, res.authid, res.authrole, res.authmethod, res.a
uthprovider)
          File "/usr/local/lib/python2.7/dist-packages/autobahn/wamp/protocol.py
", line 1221, in welcome
            self._router = self._router_factory.get(realm)
          File "/usr/local/lib/python2.7/dist-packages/autobahn/wamp/router.py",
 line 173, in get
            self._routers[realm] = self.router(self, realm, self._options)
          File "/usr/local/lib/python2.7/dist-packages/autobahn/wamp/router.py",
 line 52, in __init__
            self._broker = self.broker(self, self._options)
        exceptions.AttributeError: Router instance has no attribute 'broker'
2014-08-2309:54:15+1200[WampWebSocketServerProtocol,0127.0.0.1]RX WAMP你好
消息(realm=realm1,roles=[,,],authmethods=None,authi
d=无)
2014-08-23 09:54:15+1200[WampWebSocketServerProtocol,0127.0.0.1]未处理的错误
或延期:
2014-08-23 09:54:15+1200[WampWebSocketServerProtocol,0127.0.0.1]未处理的错误
或
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/python2.7/dist-packages/autobahn/wamp/websocket.p
“y”,第90行,在onMessage中
self.\u session.onMessage(msg)
文件“/usr/local/lib/python2.7/dist-packages/autobahn/wamp/protocol.py
,第1267行,在onMessage中
self.\u添加\u未来\u回调(d、成功、失败)
文件“/usr/local/lib/python2.7/dist-packages/autobahn/twisted/wamp.py”
,第72行,在添加未来回调中
return future.addCallbacks(callback,errback)
文件“/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py
,第295行,在addCallbacks中
self.\u runCallbacks()
---  ---
文件“/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py
“,第577行,在_runCallbacks中
current.result=回调(current.result,*args,**kw)
文件“/usr/local/lib/python2.7/dist-packages/autobahn/wamp/protocol.py
“,第1250行,成功
欢迎(self.\u realm、res.authid、res.authrole、res.authmethod、res.a
(供应商)
文件“/usr/local/lib/python2.7/dist-packages/autobahn/wamp/protocol.py
,第1221行,欢迎光临
self.\u router=self.\u router\u factory.get(领域)
文件“/usr/local/lib/python2.7/dist packages/autobahn/wamp/router.py”,
第173行,在get中
self.\u路由器[realm]=self.router(self、realm、self.\u选项)
文件“/usr/local/lib/python2.7/dist packages/autobahn/wamp/router.py”,
第52行,in_uuuinit__
self.\u broker=self.broker(self,self.\u选项)
exceptions.AttributeError:路由器实例没有属性“broker”

似乎高速公路上有一个bug,因为:

pip install autobahn --upgrade
似乎已经在0.8.14版本的autobahn中修复了此问题

抱歉,在询问之前未进行更新:)