apport-cli crashed with AttributeError in is_distro_package(): 'NoneType' object has no attribute 'origins'

Bug #971497 reported by Walter Garcia-Fontes
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

 I was trying to produce apport information for a bug report with:

apport-cli -f -p linux --save bug.apport

and apport-cli crashed with the following messages in the terminal:

apport-cli -f -p linux --save bug.apport

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
Traceback (most recent call last):
  File "/usr/bin/apport-cli", line 365, in <module>
    if not app.run_argv():
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 543, in run_argv
    return self.run_report_bug()
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 348, in run_report_bug
    self.collect_info(symptom_script)
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 861, in collect_info
    icthread.exc_raise()
  File "/usr/lib/python2.7/dist-packages/apport/REThread.py", line 34, in run
    self._retval = self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/dist-packages/apport/ui.py", line 74, in thread_collect_info
    report.add_package_info(package)
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 224, in add_package_info
    self._customized_package_suffix(package))
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 185, in _customized_package_suffix
    if not packaging.is_distro_package(package):
  File "/usr/lib/python2.7/dist-packages/apport/packaging_impl.py", line 142, in is_distro_package
    origins = pkg.candidate.origins
AttributeError: 'NoneType' object has no attribute 'origins'

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: apport 2.0-0ubuntu2
Uname: Linux 3.2.13-030213-generic x86_64
NonfreeKernelModules: snd_hrtimer xt_limit xt_tcpudp ipt_LOG ipt_MASQUERADE xt_DSCP ipt_REJECT nf_conntrack_irc nf_conntrack_ftp xt_state bnep rfcomm binfmt_misc dm_crypt snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel snd_usb_audio snd_hda_codec snd_hwdep snd_usbmidi_lib snd_pcm snd_seq_midi snd_seq_midi_event arc4 snd_seq iwlwifi snd_timer snd_rawmidi snd_seq_device mac80211 iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack snd nf_defrag_ipv4 soundcore joydev gspca_zc3xx iptable_mangle cfg80211 gspca_main uvcvideo snd_page_alloc btusb mac_hid iptable_filter bluetooth ip_tables x_tables videodev ppdev intel_ips coretemp mei parport_pc dell_laptop dcdbas dell_wmi sparse_keymap psmouse serio_raw v4l2_compat_ioctl32 lp parport usbhid hid i915 sdhci_pci e1000e sdhci firewire_ohci firewire_core drm_kms_helper crc_itu_t drm wmi i2c_algo_bit video
ApportLog:

ApportVersion: 2.0-0ubuntu2
Architecture: amd64
CrashCounter: 1
Date: Mon Apr 2 14:25:00 2012
ExecutablePath: /usr/bin/apport-cli
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/apport-cli -f -p linux --save bug.apport
PythonArgs: ['/usr/bin/apport-cli', '-f', '-p', 'linux', '--save', 'bug.apport']
SourcePackage: apport
Title: apport-cli crashed with AttributeError in is_distro_package(): 'NoneType' object has no attribute 'origins'
UpgradeStatus: Upgraded to precise on 2012-03-02 (31 days ago)
UserGroups: adm admin audio cdrom dialout dip lp lpadmin plugdev sambashare saned scanner vboxusers video

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :
visibility: private → public
Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

Actually I cannot report any bug any more, "ubuntu-bug" package will also produce this same error.

tags: removed: need-duplicate-check
Revision history for this message
dino99 (9d9) wrote :
Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

Thanks @dino99. Do you think the two bugs are duplicate? The messages produced in the terminal are sort of different.

The strange thing is that I'm getting this error only in one of my 12.04 updated systems. In the others I can run apport without any problem.

Revision history for this message
dino99 (9d9) wrote :

is there some differences between these systems ? like fresh install / dist-updrade for others . Maybe some borked settings inside hidden files/folders. Can remove .local on the faulty system then you get a new clean one on next reboot. If it help, then it a dirty update issue. But i doubt that both reports are hitting the same problem.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

Both were updated one month ago to 12.04 Beta 1, with "update-manager -d". I'll be checking on what is causing this, I doubt the files in .local will have anything to do but I'll try anyway.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

Some more info: This error does not pop up when I log in the guest account. Neither does it appear if I simulate "root" with "sudo su". I tried recreating ".local" but the error is still here. But it seems that it is only for my user.

Revision history for this message
Walter Garcia-Fontes (walter-garcia) wrote :

I'm still having this problem. In the meantime I have figured out that it only happens with my main user (I can for instance run "ubuntu-bug" from the guest account). I have tried everything to clean my user account but I still get this error.

I also noticed that the error does not pop up if I run apport with "sudo", that is for instance "sudo ubuntu-bug <package>", but no matter what I do "ubuntu-bug <package>" produces the above error.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed
Changed in apport (Ubuntu):
importance: Undecided → 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.