Page 1 of 1

[ERROR ... ui:168 cannot import name ReactorAlready

Posted: Sat Oct 18, 2014 3:18 am
by kjs
Running Ubuntu Lucid. Deluge updated via the PPA yesterday, and I've been unable to get Deluge to run since. I've uninstalled, reinstalled all the dependencies I can find, tried downgrading back to 1.2.2 (runs, but won't do any torrents). On the latest upgraded version, 1.3.10, the most I can get it to do is:

Code: Select all

 $ deluge
[ERROR   ] 19:57:52 ui:168 cannot import name ReactorAlreadyInstalledError
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/deluge/ui/ui.py", line 149, in __init__
    from deluge.ui.gtkui.gtkui import GtkUI
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/__init__.py", line 1, in <module>
    from gtkui import start
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/gtkui.py", line 42, in <module>
    from twisted.internet.error import ReactorAlreadyInstalledError
ImportError: cannot import name ReactorAlreadyInstalledError
[ERROR   ] 19:57:52 ui:169 There was an error whilst launching the request UI: gtk
[ERROR   ] 19:57:52 ui:170 Look at the traceback above for more information.
Any ideas? Seems that multiple reactors are loading from the 'start' in __init___.py:

Code: Select all

 $ python
Python 2.6.5 (r265:79063, Feb 27 2014, 19:44:14) 
[GCC 4.4.3] on linux2

Code: Select all

 $ python __init__.py
Traceback (most recent call last):
  File "__init__.py", line 1, in <module>
    from gtkui import start
  File "/usr/share/pyshared/deluge/ui/gtkui/gtkui.py", line 42, in <module>
    from twisted.internet.error import ReactorAlreadyInstalledError
ImportError: cannot import name ReactorAlreadyInstalledError
Any ideas? I've used Deluge for years... I really need to get it working again... is this a dependency problem?

Thanks,
KJ

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Sat Oct 18, 2014 9:55 am
by Cas
This is likely due to using an older version of Twisted on Lucid, can you create a ticket for 1.3.x milestone and I will look to fix it.

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Sat Oct 18, 2014 12:29 pm
by Cas

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Fri Oct 24, 2014 11:21 pm
by kjs
Thanks for the tip. I finally just went back to the previous version, and deleted the ~/.config/deluge folder, then v1.2x reconfigured correctly and is working fine.

If I get some time to mess with it, I might download the a src tar with that change reverted and test drive it. But, for now, at least it's functional again. I've version locked it in apt to keep it from updating again for now.

Regards,
KJS

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Sat Nov 01, 2014 6:44 am
by TheOne.Pc
Hello
I've got the same error message

Code: Select all

:~$ deluge
[ERROR   ] 07:48:05 ui:168 cannot import name ReactorAlreadyInstalledError
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/deluge/ui/ui.py", line 149, in __init__
    from deluge.ui.gtkui.gtkui import GtkUI
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/__init__.py", line 1, in <module>
    from gtkui import start
  File "/usr/lib/pymodules/python2.6/deluge/ui/gtkui/gtkui.py", line 42, in <module>
    from twisted.internet.error import ReactorAlreadyInstalledError
ImportError: cannot import name ReactorAlreadyInstalledError
[ERROR   ] 07:48:05 ui:169 There was an error whilst launching the request UI: gtk
[ERROR   ] 07:48:05 ui:170 Look at the traceback above for more information.
Can anyone help me step by step, please?... I'm a noob :?

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Sun Nov 02, 2014 6:20 pm
by evilsheep
I had the same problem on CentOS 6.5 the fix suggested by Cas fixed the issue for me.

Thanks very much :)

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Sun Nov 02, 2014 6:36 pm
by evilsheep
TheOne.Pc wrote:Can anyone help me step by step, please?... I'm a noob :?
I'll give it a go:

Stop Deluge and make these changes.

Code: Select all

$ tar zxf deluge-1.3.10.tar.gz
$ cd deluge-1.3.10/deluge/ui/gtkui
$ vi gtkui.py
Change these lines:

Code: Select all

# Install the twisted reactor
from twisted.internet import gtk2reactor
from twisted.internet.error import ReactorAlreadyInstalledError

try:
    reactor = gtk2reactor.install()
except ReactorAlreadyInstalledError, e:
    # Running unit tests so trial already installed a rector
    pass
To:

Code: Select all

# Install the twisted reactor
from twisted.internet import gtk2reactor
reactor = gtk2reactor.install()
Then rebuild and re-install Deluge:

Code: Select all

$ cd ../../..
$ python setup.py build
$ sudo python setup.py install
$ sudo python setup.py install_data
If that worked then you should be able to restart Deluge and the GUI will work.

Hope that's enough info.

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Tue Nov 11, 2014 5:08 am
by nuchdog
try commenting out the following line in gtkui.py

was:
...
# Install the twisted reactor
from twisted.internet import gtk2reactor
from twisted.internet.error import ReactorAlreadyInstalledError
...


temp fix:
...
# Install the twisted reactor
from twisted.internet import gtk2reactor
#from twisted.internet.error import ReactorAlreadyInstalledError
...

Re: [ERROR ... ui:168 cannot import name ReactorAlready

Posted: Tue Nov 18, 2014 12:10 pm
by Cas
I have applied a fix to the 1.3-stable branch so it will be in the next release: http://git.deluge-torrent.org/deluge/co ... b81620ea56