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

General support for problems installing or using Deluge
Post Reply
kjs
New User
New User
Posts: 2
Joined: Sat Oct 18, 2014 3:03 am

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

Post 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
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

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

Post 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.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

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

Post by Cas »

kjs
New User
New User
Posts: 2
Joined: Sat Oct 18, 2014 3:03 am

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

Post 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
TheOne.Pc

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

Post 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 :?
evilsheep
New User
New User
Posts: 2
Joined: Sun Nov 02, 2014 6:16 pm

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

Post by evilsheep »

I had the same problem on CentOS 6.5 the fix suggested by Cas fixed the issue for me.

Thanks very much :)
evilsheep
New User
New User
Posts: 2
Joined: Sun Nov 02, 2014 6:16 pm

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

Post 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.
nuchdog
New User
New User
Posts: 4
Joined: Sat Mar 27, 2010 8:10 pm

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

Post 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
...
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

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

Post 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
Post Reply