qlog crashes with 'NoneType' object has no attribute 'style'

Bug #544928 reported by Christian Faulhammer
210
This bug affects 35 people
Affects Status Importance Assigned to Milestone
Bazaar Mac Installers
Fix Released
Undecided
Unassigned
QBzr
Fix Released
Critical
Gary van der Merwe
0.18
Fix Released
Critical
Gary van der Merwe
Gentoo Linux
Fix Released
Medium
qbzr (Ubuntu)
Fix Released
High
Andrew Starr-Bochicchio
Lucid
Fix Released
High
Andrew Starr-Bochicchio

Bug Description

bzr qlog combination of PyQt 4.7.2 and Qt 4.6.2.

It works with:
PyQt 4.7.2 and Qt 4.6.1
PyQt 4.7.0 and Qt 4.6.2

bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute
'style'

Traceback (most recent call last):
  File
"/usr/lib/python2.6/site-packages/bzrlib/plugins/qbzr/lib/revtreeview.py", line
188, in paint
    style = widget.style()
AttributeError: 'NoneType' object has no attribute 'style'

Source code snipet:

class RevNoItemDelegate(QtGui.QStyledItemDelegate):

    ....

    def paint(self, painter, option, index):
        option = QtGui.QStyleOptionViewItemV4(option)
        self.initStyleOption(option, index)
        widget = option.widget
        style = widget.style() <-breaks here because widget is None

        .... Paint code

Related branches

Revision history for this message
Christian Faulhammer (fauli) wrote :

This also affects Qbzr 0.18.4

Changed in gentoo:
status: Unknown → Confirmed
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Also seen on mac (bug 545492) so does not seem to be specific to os.

Revision history for this message
Federico Bett (gfbett) wrote :

Same here on Mac, Snow leopard, and bzr installed from Macports
Installed ports:
bzr @2.1.0 devel/bzr
bzr-explorer @1.0.1 devel/bzr-explorer
bzr-rebase @0.5.5 devel/bzr-rebase
bzr-svn @1.0.2 devel/bzr-svn
qbzr @0.18.4 devel/qbzr
py26-pyqt4 @4.7.2 python/py26-pyqt4
qt4-mac @4.6.2 aqua/qt4-mac

Revision history for this message
Federico Bett (gfbett) wrote :

Downgrading py26-pyqt to 4.7 fixed the issue (I used this: sudo port activate py26-pyqt4 @4.7_0, because I had an older pyqt installed )

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

I saw this happen on a colleague lucid machine. Busy upgradeing...

Changed in qbzr:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

If anyone has the source code for pyqt 4.7.0 or 4.7.1, that would be very usefull (it's not available on riverbank's site)

Revision history for this message
Christian Faulhammer (fauli) wrote :

4.7.2 is found here http://www.riverbankcomputing.com/static/Downloads/PyQt4/, 4.7.0 at least from http://distfiles.gentoo.org/distfiles/ (name PyQt-x11-gpl-*), unfortunately 4.7.1 is gone from our Gentoo distfiles mirrors. I asked the reporter to try with 4.7.2.

Revision history for this message
Christian Faulhammer (fauli) wrote :

Feedback from Gentoo user is: Still fails with 4.7.2.

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

I've got the code for pyqt 4.7.2. I'm looking for 4.7.0/4.7.1 so that I can see what has changed.

I found a diff between 4.7.2 and 4.7.0 here:
https://edge.launchpad.net/ubuntu/+archive/primary/+files/python-qt4_4.7.0-2ubuntu3_4.7.2-0ubuntu1.diff.gz

Revision history for this message
Joseph Price (pricechild) wrote :

In reply to Gary van der Merwe, I'm also suffering it on Windows XP. Definitely not platform specific.

Changed in qbzr (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Martin von Gagern (gagern) wrote :

If I had access to the pyqt repository (likely hg), I might try bisecting this... Has anyone contacted pyqt people already?

Revision history for this message
Max Bowsher (maxb) wrote :

This would appear to now be reliably reproducable on current Ubuntu lucid.

Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
milestone: none → 0.19b2
status: Confirmed → Fix Released
Changed in qbzr (Ubuntu Lucid):
assignee: nobody → Andrew Starr-Bochicchio (andrewsomething)
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qbzr - 0.18.5-0ubuntu1

---------------
qbzr (0.18.5-0ubuntu1) lucid; urgency=low

  * New upstream bugfix release.
   - Fixes qlog with PyQt 4.7.2. (LP: #544928)
 -- Andrew Starr-Bochicchio <email address hidden> Fri, 02 Apr 2010 13:08:20 -0400

Changed in qbzr (Ubuntu Lucid):
status: In Progress → Fix Released
Changed in gentoo:
status: Confirmed → Fix Released
summary: - qlog fails with a special combination of PyQt4 and Qt
+ Test
summary: - Test
+ qlog crashes with 'NoneType' object has no attribute 'style'
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Wow - this bug has 9 dups. I've change the title in the hope that the dup catcher will find it.

Revision history for this message
edA-qa (eda-qa) wrote :

I'm not positive on the versions, but Fedora 13 appears to have qbzr 0.19 and still have the error. That appears to be a newer version than the fix 0.18.

===

bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'style'

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bzrlib/plugins/qbzr/lib/revtreeview.py", line 193, in paint
    style = widget.style()
AttributeError: 'NoneType' object has no attribute 'style'

bzr 2.1.2 on python 2.6.4 (linux2)
arguments: ['/usr/bin/bzr', 'qlog', 'ullia/src/evio/system_demux_kernel.cpp']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib64/python2.6/site-packages/bzrlib/plugins/launchpad [2.1.2]
  netrc_credential_store /usr/lib64/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.1.2]
  news_merge /usr/lib64/python2.6/site-packages/bzrlib/plugins/news_merge [2.1.2]
  qbzr /usr/lib/python2.6/site-packages/bzrlib/plugins/qbzr [0.19.0b1]

===

Bazaar (bzr) 2.1.2
  Python interpreter: /usr/bin/python 2.6.4
  Python standard library: /usr/lib64/python2.6
  Platform: Linux-2.6.33.5-124.fc13.x86_64-x86_64-with-fedora-13-Goddard
  bzrlib: /usr/lib64/python2.6/site-packages/bzrlib
  Bazaar configuration: /home/mortoray/.bazaar
  Bazaar log file: /home/mortoray/.bzr.log

Copyright 2005-2010 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Bazaar is part of the GNU Project to produce a free operating system.

===

PyQt.x86_64 3.18.1-6.fc13
qt.x86_64 1:4.6.2-20.fc13
qbzr.noarch 0.19-0.1.b1.fc13
bzr.x86_64 2.1.2-1.fc13

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 544928] Re: qlog crashes with 'NoneType' object has no attribute 'style'

edA-qa пишет:
> I'm not positive on the versions, but Fedora 13 appears to have qbzr
> 0.19 and still have the error. That appears to be a newer version than
> the fix 0.18.

> qbzr /usr/lib/python2.6/site-packages/bzrlib/plugins/qbzr [0.19.0b1]

You have 0.19.b1 which does not have this fix yet. 0.18.x is separate
series of stable releases and it's partially overlap with unstable
releases of 0.19betaX.

0.18.6 is stable and has the fix.

Revision history for this message
Gary van der Merwe (garyvdm) wrote : Re: [Bug 544928] Re: qlog crashes with 'NoneType' object has no attribute 'style'

On Fri, Jun 25, 2010 at 7:57 AM, edA-qa <email address hidden> wrote:
> I'm not positive on the versions, but Fedora 13 appears to have qbzr
> 0.19 and still have the error. That appears to be a newer version than
> the fix 0.18.

0.19 is still in beta. I think it is more likely that you installed
qbzr from trunk. Please check where qbzr is installed:

$ bzr plugins -v
.....

qbzr 0.19.0dev1
    QBzr - Qt-based frontend for Bazaar
    /home/garyvdm/.bazaar/plugins/qbzr

.....

Check if it is versioned with bzr:

$ bzr info ~/.bazaar/plugins/qbzr/
Repository tree (format: 2a)
Location:
  shared repository: /home/garyvdm/.bazaar/plugins/qbzr
  repository branch: /home/garyvdm/.bazaar/plugins/qbzr

Related branches:
  parent branch: bzr+ssh://bazaar.launchpad.net/~qbzr-dev/qbzr/trunk2a/

Ok - pull the latest version then:

$ bzr pull -d ~/.bazaar/plugins/qbzr/
Using saved parent location:
bzr+ssh://bazaar.launchpad.net/~qbzr-dev/qbzr/trunk2a/
 M NEWS.txt
 M lib/loggraphprovider.py
All changes applied successfully.
Now on revision 1282.

Revision history for this message
edA-qa (eda-qa) wrote :

This is the standard version in Fedora 13. I'll see if I can downgrade to the stable releases to get the fix. Thank you.

qbzr 0.19.0b1
    QBzr - Qt-based frontend for Bazaar
    /usr/lib/python2.6/site-packages/bzrlib/plugins/qbzr

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

The latest stable MacOSX installer (2.1.2) only has qbzr 0.18.4, and so suffers from this bug.

Gordon: If you do another 2.1 installer, please make sure that you have qbzr 0.18.6.

Revision history for this message
Gordon Tyler (doxxx) wrote :

We aren't doing anymore installers for the 2.1 series and the 2.2+ installers are using qbzr 0.19.

Changed in bzr-mac-installers:
status: New → Fix Released
Changed in gentoo:
importance: Unknown → Medium
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.