Failed to import class \'crossbar.adapter.rest.RESTCallee

#1

Getting the following error when trying to add a RESTCallee in 0.11.2 with python 3.5.1

···

2016-01-19T00:55:55+0000 [Controller 7] Container with ID ‘worker2’ and PID 15 started
2016-01-19T00:55:55+0000 [Container 15] Component loading failed:

Failed to import class ‘crossbar.adapter.rest.RESTCallee’
Traceback (most recent call last):
File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future
return maybeDeferred(fun, *args, **kwargs)
File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred
result = f(*args, **kw)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component
create_component = _appsession_loader(config)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 68, in _appsession_loader
klassname, Failure(e).getTraceback())
— —
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 59, in _appsession_loader
component = getattr(module, klass_name)
builtins.AttributeError: module ‘crossbar.adapter.rest’ has no attribute ‘RESTCallee’

2016-01-19T00:55:55+0000 [Container 15] NativeWorkerSession.onUserError
Traceback (most recent call last):
File “/usr/local/lib/python3.5/site-packages/autobahn/twisted/websocket.py”, line 163, in _onMessage
self.onMessage(payload, isBinary)
File “/usr/local/lib/python3.5/site-packages/autobahn/wamp/websocket.py”, line 95, in onMessage
self._session.onMessage(msg)
File “/usr/local/lib/python3.5/site-packages/autobahn/wamp/protocol.py”, line 590, in onMessage
on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)
File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future
return maybeDeferred(fun, *args, **kwargs)
— —
File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred
result = f(*args, **kw)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component
create_component = _appsession_loader(config)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 74, in _appsession_loader
pythonpath=sys.path
autobahn.wamp.exception.ApplicationError: ApplicationError(‘crossbar.error.class_import_failed’, args = (‘Failed to import class ‘crossbar.adapter.rest.RESTCallee’\nTraceback (most recent call last):\n File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future\n return maybeDeferred(fun, *args, **kwargs)\n File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred\n result = f(*args, **kw)\n File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component\n create_component = _appsession_loader(config)\n File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 68, in _appsession_loader\n klassname, Failure(e).getTraceback())\n— —\n File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 59, in _appsession_loader\n component = getattr(module, klass_name)\nbuiltins.AttributeError: module ‘crossbar.adapter.rest’ has no attribute ‘RESTCallee’\n’,), kwargs = {‘pythonpath’: [’/var/crossbar’, ‘/usr/local/lib/python3.5/site-packages/crossbar/worker’, ‘/usr/local/bin’, ‘/usr/local/lib/python35.zip’, ‘/usr/local/lib/python3.5’, ‘/usr/local/lib/python3.5/plat-linux’, ‘/usr/local/lib/python3.5/lib-dynload’, ‘/usr/local/lib/python3.5/site-packages’]})

2016-01-19T00:55:55+0000 [Controller 7] crossbar.error.class_import_failed: Failed to import class ‘crossbar.adapter.rest.RESTCallee’
Traceback (most recent call last):
File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future
return maybeDeferred(fun, *args, **kwargs)
File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred
result = f(*args, **kw)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component
create_component = _appsession_loader(config)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 68, in _appsession_loader
klassname, Failure(e).getTraceback())
— —
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 59, in _appsession_loader
component = getattr(module, klass_name)
builtins.AttributeError: module ‘crossbar.adapter.rest’ has no attribute ‘RESTCallee’

0 Likes

#2

Hi!

The REST callee isn’t available on Python 3 yet, it will be available next version.

  • Amber
···

On Tuesday, 19 January 2016 09:09:03 UTC+8, Greg Keys wrote:

Getting the following error when trying to add a RESTCallee in 0.11.2 with python 3.5.1

2016-01-19T00:55:55+0000 [Controller 7] Container with ID ‘worker2’ and PID 15 started
2016-01-19T00:55:55+0000 [Container 15] Component loading failed:

Failed to import class ‘crossbar.adapter.rest.RESTCallee’
Traceback (most recent call last):
File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future
return maybeDeferred(fun, *args, **kwargs)
File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred
result = f(*args, **kw)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component
create_component = _appsession_loader(config)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 68, in _appsession_loader
klassname, Failure(e).getTraceback())
— —
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 59, in _appsession_loader
component = getattr(module, klass_name)
builtins.AttributeError: module ‘crossbar.adapter.rest’ has no attribute ‘RESTCallee’

2016-01-19T00:55:55+0000 [Container 15] NativeWorkerSession.onUserError
Traceback (most recent call last):
File “/usr/local/lib/python3.5/site-packages/autobahn/twisted/websocket.py”, line 163, in _onMessage
self.onMessage(payload, isBinary)
File “/usr/local/lib/python3.5/site-packages/autobahn/wamp/websocket.py”, line 95, in onMessage
self._session.onMessage(msg)
File “/usr/local/lib/python3.5/site-packages/autobahn/wamp/protocol.py”, line 590, in onMessage
on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)
File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future
return maybeDeferred(fun, *args, **kwargs)
— —
File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred
result = f(*args, **kw)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component
create_component = _appsession_loader(config)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 74, in _appsession_loader
pythonpath=sys.path
autobahn.wamp.exception.ApplicationError: ApplicationError(‘crossbar.error.class_import_failed’, args = (‘Failed to import class ‘crossbar.adapter.rest.RESTCallee’\nTraceback (most recent call last):\n File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future\n return maybeDeferred(fun, *args, **kwargs)\n File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred\n result = f(*args, **kw)\n File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component\n create_component = _appsession_loader(config)\n File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 68, in _appsession_loader\n klassname, Failure(e).getTraceback())\n— —\n File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 59, in _appsession_loader\n component = getattr(module, klass_name)\nbuiltins.AttributeError: module ‘crossbar.adapter.rest’ has no attribute ‘RESTCallee’\n’,), kwargs = {‘pythonpath’: [’/var/crossbar’, ‘/usr/local/lib/python3.5/site-packages/crossbar/worker’, ‘/usr/local/bin’, ‘/usr/local/lib/python35.zip’, ‘/usr/local/lib/python3.5’, ‘/usr/local/lib/python3.5/plat-linux’, ‘/usr/local/lib/python3.5/lib-dynload’, ‘/usr/local/lib/python3.5/site-packages’]})

2016-01-19T00:55:55+0000 [Controller 7] crossbar.error.class_import_failed: Failed to import class ‘crossbar.adapter.rest.RESTCallee’
Traceback (most recent call last):
File “/usr/local/lib/python3.5/site-packages/txaio/tx.py”, line 338, in as_future
return maybeDeferred(fun, *args, **kwargs)
File “/usr/local/lib/python3.5/site-packages/twisted/internet/defer.py”, line 150, in maybeDeferred
result = f(*args, **kw)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/container.py”, line 191, in start_container_component
create_component = _appsession_loader(config)
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 68, in _appsession_loader
klassname, Failure(e).getTraceback())
— —
File “/usr/local/lib/python3.5/site-packages/crossbar/worker/init.py”, line 59, in _appsession_loader
component = getattr(module, klass_name)
builtins.AttributeError: module ‘crossbar.adapter.rest’ has no attribute ‘RESTCallee’

0 Likes