qrun --execute crashes with AttributeError

Bug #590229 reported by Michael Gliwinski
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
QBzr
Status tracked in Trunk
0.18
Fix Released
High
Simon Kersey
0.19
Fix Released
High
Simon Kersey
Trunk
Fix Released
High
Simon Kersey

Bug Description

The qrun command with '--execute' option crashes with AttributeError. Can reproduce on the following platforms/versions:

 - python 2.6.5, bzr 2.1.1, qbzr 0.18.6, qt 4.6.2, pyqt 4.7.2 on GNU/Linux
 - python 2.5.4, bzr 2.1.1, qbzr 0.18.4, qt 4.4.1 (all bundled in stable installer) on Windows

Full traceback (from GNU/Linux as it seems to contain more useful info). Also tested with no additional plugins.

bzr: ERROR: exceptions.AttributeError: 'QBzrRunDialog' object has no attribute 'init_button_status'

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/commands.py", line 166, in run
    ret_code = self._qbzr_run(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/commands.py", line 1064, in _qbzr_run
    execute=execute)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr/lib/run.py", line 133, in __init__
    self.init_button_status()
AttributeError: 'QBzrRunDialog' object has no attribute 'init_button_status'

bzr 2.1.1 on python 2.6.5 (linux2)
arguments: ['/usr/bin/bzr', 'qrun', '--ui-mode', '--execute', '--', 'status']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
plugins:
  bookmarks /home/gliwm/.bazaar/plugins/bookmarks [unknown]
  bzrtools /usr/lib/python2.6/dist-packages/bzrlib/plugins/bzrtools [2.1.0]
  etckeeper /usr/lib/python2.6/dist-packages/bzrlib/plugins/etckeeper [unknown]
  explorer /home/gliwm/.bazaar/plugins/explorer [1.1.0dev]
  fastimport /usr/lib/python2.6/dist-packages/bzrlib/plugins/fastimport [0.9.0dev]
  git /usr/lib/python2.6/dist-packages/bzrlib/plugins/git [0.4.3]
  gnulog /home/gliwm/.bazaar/plugins/gnulog.py [unknown]
  hg /home/gliwm/.bazaar/plugins/hg [0.2.0dev]
  hgs /home/gliwm/.bazaar/plugins/hgs [0.2.2dev]
  launchpad /usr/lib/python2.6/dist-packages/bzrlib/plugins/launchpad [2.1.1]
  loom /usr/lib/python2.6/dist-packages/bzrlib/plugins/loom [1.4.0dev]
  netrc_credential_store /usr/lib/python2.6/dist-packages/bzrlib/plugins/netrc_credential_store [2.1.1]
  news_merge /usr/lib/python2.6/dist-packages/bzrlib/plugins/news_merge [2.1.1]
  pager /home/gliwm/.bazaar/plugins/pager [unknown]
  qbzr /usr/lib/python2.6/dist-packages/bzrlib/plugins/qbzr [0.18.6]
  rebase /usr/lib/python2.6/dist-packages/bzrlib/plugins/rebase [0.5.5]
  repoalias /home/gliwm/.bazaar/plugins/repoalias [unknown]
  search /usr/lib/python2.6/dist-packages/bzrlib/plugins/search [1.7.0dev]
  stats /usr/lib/python2.6/dist-packages/bzrlib/plugins/stats [0.1.0dev]
  svn /usr/lib/python2.6/dist-packages/bzrlib/plugins/svn [1.0.2]
  upload /usr/lib/python2.6/dist-packages/bzrlib/plugins/upload [1.0.0dev]

Same thing (qrun --execute) with bzr trunk and qbzr trunk (and qt 4.6.2, pyqt 4.7.3) (on GNU/Linux) throws a different AttributeError:

Traceback (most recent call last):
  File "/home/tzeentch/.bazaar/plugins/qbzr/lib/commands.py", line 166, in run
    ret_code = self._qbzr_run(*args, **kwargs)
  File "/home/tzeentch/.bazaar/plugins/qbzr/lib/commands.py", line 1040, in _qbzr_run
    execute=execute)
  File "/home/tzeentch/.bazaar/plugins/qbzr/lib/run.py", line 115, in __init__
    self.ui.frame.hide()
AttributeError: 'Ui_RunDialog' object has no attribute 'frame'

BTW, without the '--execute' option qrun works OK (both in stable and trunk).

Tags: qrun

Related branches

Revision history for this message
Gary van der Merwe (garyvdm) wrote :

I've fixed the 'frame' issue in trunk. Now both trunk an 0.18 give the error :
AttributeError: 'QBzrRunDialog' object has no attribute 'init_button_status'

There is no oblivious replacement to init_button_status, and I'm not sure what it did.

Changed in qbzr:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Michael Gliwinski (tzeentch-gm) wrote :

Hmm, did a bit of looking around, hopefully it will help you a bit.

It seems the method was removed in 0.18 in rev 1172.2.4 (from trunk's POV, rev 1208 merged it into trunk) from SubProcessWindowBase. It looks like it was originally setting close and retry buttons as hidden. It was replaced by setting close button as hidden (but not retry) directly in the constructor.

The method was originally called both from SubProcessWindowBase.__init_internal__ and QBzrRunDialog.__init__ (only in case execute==True). The rev mentioned above removed the call from SubProcessWindowBase but not from QBzrRunDialog.

You probably know best what the button hiding is all about, I'm not sure what should replace the method call in QBzrRunDialog.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.