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

Bug #820055 reported by Diogo Matsubara on 2011-08-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Critical
Benji York

Bug Description

 Traceback (most recent call last):
  Module zope.publisher.publish, line 134, in publish
    result = publication.callObject(request, obj)
  Module lazr.restful.publisher, line 211, in callObject
    WebServicePublicationMixin, self).callObject(request, object)
  Module canonical.launchpad.webapp.publication, line 498, in callObject
    return mapply(ob, request.getPositionalArguments(), request)
  Module zope.publisher.publish, line 109, in mapply
    return debug_call(obj, args)
   - __traceback_info__: <security proxied lazr.restful._resource.EntryResource instance at 0x15d50610>
  Module zope.publisher.publish, line 115, in debug_call
    return obj(*args)
  Module lazr.restful._resource, line 943, in __call__
    raise e
AttributeError: 'NoneType' object has no attribute 'remove'

OOPS-2033A62 Page-id: Archive:EntryResource:deletePackageUploader

Related branches

Julian Edwards (julian-edwards) wrote :

The code in question, since it's been lovingly omitted in the traceback from Zope, is:

        permission = ArchivePermission.selectOneBy(
            archive=archive, person=person,
            sourcepackagename=sourcepackagename,
            permission=ArchivePermissionType.UPLOAD)
        Store.of(permission).remove(permission)

Store.of(None) returns None, so I suspect this is a race condition. Either way, if the selectOneBy returns None then it should just return as the permission was already deleted.

tags: added: api
Benji York (benji) on 2011-08-23
Changed in launchpad:
assignee: nobody → Benji York (benji)
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Benji York (benji) on 2011-08-30
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant) on 2011-08-31
Changed in launchpad:
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