Problem at installation with Twisted NoResource import

#1

Dear all,

I just tried to install Autobahn and fell on a anomally when importing.

An error message was displayed in console at import (for testing):

import autobahn

Traceback (most recent call last):

File “”, line 1, in

File “/usr/lib/python2.6/site-packages/autobahn-0.5.5-py2.6.egg/autobahn/init.py”, line 32, in

import resource

File “/usr/lib/python2.6/site-packages/autobahn-0.5.5-py2.6.egg/autobahn/resource.py”, line 24, in

from twisted.web.error import NoResource, UnsupportedMethod

ImportError: cannot import name NoResource

Version of Autobahn is 0.5.5 and Twisted is 12.2.2. Apparently NoResource is part of twisted.web.resource, not twisted.web.error.

I just modified the script autobahn.resource.py on lines 24 & 25 to move the class import from one path to the other and everything went well :slight_smile:

Is it a recent evolution of Twisted packages that needs an update to the project or something wrong with my system?

Cheers,

François

0 Likes

#2

Hi François,

This is related to an API change in Twisted 12.2.2 .. we'll fix it (like you did) in the next release.

Cheers,
Tobias

···

Am 07.09.2012 13:01, schrieb Rigaudie François:

Dear all,

I just tried to install Autobahn and fell on a anomally when importing.
An error message was displayed in console at import (for testing):

     >>> import autobahn

    Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       File
    "/usr/lib/python2.6/site-packages/autobahn-0.5.5-py2.6.egg/autobahn/__init__.py",
    line 32, in <module>
         import resource
       File
    "/usr/lib/python2.6/site-packages/autobahn-0.5.5-py2.6.egg/autobahn/resource.py",
    line 24, in <module>
         from twisted.web.error import NoResource, UnsupportedMethod
    ImportError: cannot import name NoResource

Version of Autobahn is 0.5.5 and Twisted is 12.2.2. Apparently
NoResource is part of twisted.web.resource, not twisted.web.error.
I just modified the script autobahn.resource.py on lines 24 & 25 to move
the class import from one path to the other and everything went well :slight_smile:

Is it a recent evolution of Twisted packages that needs an update to the
project or something wrong with my system?

Cheers,

François

0 Likes

#3

Thanks for quick answer :slight_smile:
F

···

Le vendredi 7 septembre 2012 13:01:01 UTC+2, Rigaudie François a écrit :

Dear all,

I just tried to install Autobahn and fell on a anomally when importing.

An error message was displayed in console at import (for testing):

import autobahn

Traceback (most recent call last):

File “”, line 1, in

File “/usr/lib/python2.6/site-packages/autobahn-0.5.5-py2.6.egg/autobahn/init.py”, line 32, in

import resource

File “/usr/lib/python2.6/site-packages/autobahn-0.5.5-py2.6.egg/autobahn/resource.py”, line 24, in

from twisted.web.error import NoResource, UnsupportedMethod

ImportError: cannot import name NoResource

Version of Autobahn is 0.5.5 and Twisted is 12.2.2. Apparently NoResource is part of twisted.web.resource, not twisted.web.error.

I just modified the script autobahn.resource.py on lines 24 & 25 to move the class import from one path to the other and everything went well :slight_smile:

Is it a recent evolution of Twisted packages that needs an update to the project or something wrong with my system?

Cheers,

François

0 Likes