AttributeError: 'NoneType' object has no attribute 'self_link'

Bug #495326 reported by Rick Spencer on 2009-12-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restfulclient (Ubuntu)
James Westby

Bug Description

Bug hugger, worked fine in 9.10:

Now results in this error:
  File "/home/rick/dictview_bughugger/bughugger/", line 302, in bug_dict
    if bug.assignee != None:
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/", line 338, in __ne__
    return not self == other
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/", line 603, in __eq__
    self.self_link == other.self_link and
AttributeError: 'NoneType' object has no attribute 'self_link'

ProblemType: Bug
Architecture: i386
Date: Thu Dec 10 20:37:46 2009
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: python-lazr.restfulclient 0.9.10-1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 2.6.32-7.10-generic
SourcePackage: lazr.restfulclient
Tags: lucid
Uname: Linux 2.6.32-7-generic i686

Related branches

here's a patch that bandaids the problem:
=== modified file 'src/lazr/restfulclient/'
--- old/src/lazr/restfulclient/ 2009-10-23 13:22:44 +0000
+++ new/src/lazr/restfulclient/ 2009-12-11 04:52:32 +0000
@@ -599,6 +599,10 @@
         attributes are the same, and if their dirty attribute dicts
         contain the same values.
+ #they also aren't equal if one of them is None
+ if other is None:
+ return False
         return (
             self.self_link == other.self_link and
             self.http_etag == other.http_etag and

Taking the liberty of setting to confirmed, as seb128 also experienced this issue

Changed in lazr.restfulclient (Ubuntu):
status: New → Confirmed
importance: Undecided → High

On Fri Dec 11 05:14:03 UTC 2009 Rick Spencer wrote:
> Taking the liberty of setting to confirmed, as seb128 also experienced
> this issue


looks to be the cause.

Rick, your patch looks almost correct to me, it's certainly the right start.
Do you want to make a branch and propose it for merging?

Looking at the diff there's the same bug in the other implementation of __eq__
that was added. Also, there should be a couple of doctests added comparing
with None, but I think an LP dev will add tests for you if you propose the



Assigning to self until I get a branch proposed

Changed in lazr.restfulclient (Ubuntu):
assignee: nobody → Rick Spencer (rick-rickspencer3)

I proposed the branch merge, back to you James. Thanks.

Changed in lazr.restfulclient (Ubuntu):
assignee: Rick Spencer (rick-rickspencer3) → James Westby (james-w)
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lazr.restfulclient - 0.9.10-2

lazr.restfulclient (0.9.10-2) unstable; urgency=low

  * debian/patches/comparison_fixes.patch:
    - Cherrypick a fix from upstream bzr repository to fix comparisons of
      entries and hosted files with None (LP: #495326).
  * debian/control:
    - Bump Standards-Version to 3.8.4, no changes required.
  * Switch to format 3.0 (quilt).
 -- Ubuntu Archive Auto-Sync <email address hidden> Wed, 03 Feb 2010 23:38:15 +0000

Changed in lazr.restfulclient (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers