Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2148 closed bug (Fixed)

Gtk2Reactor object has no attribute simulate

Reported by: Cas Owned by:
Priority: major Milestone: 1.3.6
Component: GTK UI Version: 1.3.5
Keywords: Cc: a.starr.b@…

Description

Seeing the following on Ubuntu 12.04 and it prevents showing the Connection Manager. Using a try-except would workaround it but wonder if it is actually still required based upon source code comments and the error.

Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 413, in fireEvent
    DeferredList(beforeResults).addCallback(self._continueFiring)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 298, in addCallback
    callbackKeywords=kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 287, in addCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 426, in _continueFiring
    callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/deluge/ui/gtkui/gtkui.py", line 336, in _on_reactor_start
    self.__start_non_classic()
  File "/usr/lib/python2.7/dist-packages/deluge/ui/gtkui/gtkui.py", line 376, in __start_non_classic
    reactor.simulate()
exceptions.AttributeError: 'Gtk2Reactor' object has no attribute 'simulate'

Change History (5)

comment:1 Changed 12 years ago by andar

What version of Twisted?

comment:2 Changed 12 years ago by Cas

Twisted 11.1

comment:3 Changed 12 years ago by andar

Hmm.. The latest version of Twisted still has this method in Gtk2Reactor, so I'm not really sure why you're getting this error.

I wonder if Ubuntu is doing some weird patching of Twisted?

We could probably add a try/except around this call.. As it stands, it's a hack anyways to work around something in the Gtk2Reactor not working properly, although I don't remember exactly what ;)

From gtkui.py:

            if self.config["show_connection_manager_on_start"]:
                # XXX: We need to call a simulate() here, but this could be a bug in twisted
                reactor.simulate()
                self.connectionmanager.show()

comment:4 Changed 12 years ago by johnnyg

  • Resolution set to fixed
  • Status changed from new to closed

Actually it was renamed in twisted 12; maybe cas got his versions confused?

I've committed a fix in http://git.deluge-torrent.org/deluge/commit/?h=1.3-stable&id=17cac01673d479ecb4f4dbbc16a5c82bc19907e9 so that it will be in 1.3.6.

comment:5 Changed 12 years ago by andrewsomething

  • Cc a.starr.b@… added

Just a note, Ubuntu 12.04 does use Twisted 11, but they have backported some gtk2reactor changes in a patch:

twisted (11.1.0-1ubuntu1) precise; urgency=low

  • debian/patches/00_gi_gtk3reactor.patch:
    • Backport gireactor/gtk3reactor and gtk2reactor refactor from svn (LP: #571648, LP: #851187)

-- Rodney Dawes <rodney.dawes@…> Wed, 15 Feb 2012 21:39:07 -0500

Note: See TracTickets for help on using tickets.