如何从autobahn python脚本中删除此错误?

时间:2015-02-06 06:18:21

标签: python python-2.7 autobahn autobahnws

我正在通过以下链接关注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'

这在高速公路上被提到是一个问题,但我无法理解它足以将解决方案自己视为新手。 https://github.com/tavendo/AutobahnPython/issues/211

我正在使用python 2.7

1 个答案:

答案 0 :(得分:1)

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