1

我正在通过下面的链接关注 Autobahn python 的教程;

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/app/calculator/calculator.py

导致错误的代码如下;

runner = ApplicationRunner(router, u"realm1", standalone = not args.router,
      debug = False,             # low-level logging
      debug_wamp = args.debug,   # WAMP level logging
      debug_app = args.debug     # app-level logging
   )

错误信息是;

Using Twisted reactor <class 'twisted.internet.selectreactor.SelectReactor'>
Traceback (most recent call last):
  File "calculator.py", line 117, in <module>
    debug_app = args.debug     # app-level logging
TypeError: __init__() got an unexpected keyword argument 'standalone'

这是 Autobahn 中提到的一个问题,但我无法充分理解它,无法自己作为新手找到解决方案。 https://github.com/tavendo/AutobahnPython/issues/211

我正在使用 python 2.7

4

1 回答 1

1

standalone从构造函数中删除参数ApplicationRunner并连接到外部 WAMP 路由器,如Crossbar.io (或此处列表中兼容的任何其他 WAMP v2 )。

于 2015-02-10T12:19:59.350 回答