ImportError: No module named apport.packaging_impl

Bug #348250 reported by Martin Pool on 2009-03-25
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Low
Martin Pitt

Bug Description

Binary package hint: apport

When I hit an exception in rdiff-backup (not caused by a bug, just out of space), I get this import error from apport:

Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport_python_hook.py", line 38, in apport_excepthook
    from apport.packaging_impl import impl as packaging
ImportError: No module named apport.packaging_impl

ProblemType: Bug
ApportLog:
 apport (pid 5328) Wed Mar 25 11:41:14 2009: called for pid 12763, signal 11
 apport (pid 5328) Wed Mar 25 11:41:14 2009: executable: /usr/lib/nspluginwrapper/i386/linux/npviewer.bin (command line "/usr/lib/nspluginwrapper/i386/linux/npviewer.bin --plugin /usr/lib/flashplugin-nonfree/libflashplayer.so --connection /org/wrapper/NSPlugins/libflashplayer.so/6319-3")
 apport (pid 5328) Wed Mar 25 11:41:23 2009: wrote report /var/crash/_usr_lib_nspluginwrapper_i386_linux_npviewer.bin.1000.crash
Architecture: amd64
CrashReports:
 600:1000:1000:17619:2009-03-25 12:25:42.000000000 +1100:2009-03-25 12:25:52.000000000 +1100:/var/crash/_usr_bin_rdiff-backup.1000.crash
 600:1000:1000:6220650:2009-03-25 11:41:22.000000000 +1100:2009-03-25 11:41:30.000000000 +1100:/var/crash/_usr_lib_nspluginwrapper_i386_linux_npviewer.bin.1000.crash
 600:1001:1001:13592:2009-03-18 18:55:06.000000000 +1100:2009-03-18 18:55:06.000000000 +1100:/var/crash/_usr_bin_deluge.1001.crash
 600:1000:1000:16790103:2009-03-24 09:06:39.000000000 +1100:2009-03-24 09:06:40.000000000 +1100:/var/crash/_usr_bin_pidgin.1000.crash
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: apport 0.145
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/zsh
SourcePackage: apport
Uname: Linux 2.6.28-11-generic x86_64

Martin Pool (mbp) wrote :
Martin Pitt (pitti) wrote :

If you do

  python -c 'from apport.packaging_impl import impl as packaging'

does that generate the same error? Could it be that the python-apport package wasn't configured properly at that time?

Changed in apport (Ubuntu):
status: New → Incomplete
Martin Pool (mbp) wrote :

That works. It's either specific to the situation, or it's gone away by itself, maybe because of the package being update.

Changed in apport (Ubuntu):
status: Incomplete → Confirmed
Martin Pool (mbp) wrote :

It just happened again:

gpg: Interrupt caught ... exiting
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 582, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 576, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 557, in main
    full_backup(col_stats)
  File "/usr/bin/duplicity", line 235, in full_backup
    bytes_written = write_multivol("full", tarblock_iter, globals.backend)
  File "/usr/bin/duplicity", line 149, in write_multivol
    globals.gpg_profile, globals.volsize)
  File "/usr/lib/python2.6/dist-packages/duplicity/gpg.py", line 241, in GPGWriteFile
    data = block_iter.next(bytes_to_go).data
  File "/usr/lib/python2.6/dist-packages/duplicity/diffdir.py", line 466, in next
    result = self.process(self.input_iter.next(), size)
  File "/usr/lib/python2.6/dist-packages/duplicity/diffdir.py", line 176, in get_delta_iter
    for new_path, sig_path in collated:
  File "/usr/lib/python2.6/dist-packages/duplicity/diffdir.py", line 265, in collate2iters
    for relem1 in riter1:
  File "/usr/lib/python2.6/dist-packages/duplicity/selection.py", line 159, in Iterate
    subpath, val = diryield_stack[-1].next()
  File "/usr/lib/python2.6/dist-packages/duplicity/selection.py", line 135, in diryield
    for filename in robust.listpath(path):
  File "/usr/lib/python2.6/dist-packages/duplicity/robust.py", line 60, in listpath
    dir_listing = check_common_error(error_handler, path.listdir)
  File "/usr/lib/python2.6/dist-packages/duplicity/robust.py", line 37, in check_common_error
    try: return function(*args)
  File "/usr/lib/python2.6/dist-packages/duplicity/path.py", line 490, in listdir
    return os.listdir(self.name)
KeyboardInterrupt
close failed in file object destructor:
IOError: [Errno 32] Broken pipe
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport_python_hook.py", line 38, in apport_excepthook
    from apport.packaging_impl import impl as packaging
ImportError: No module named apport.packaging_impl

Original exception was:
IOError: [Errno 32] Broken pipe
close failed in file object destructor:
IOError: [Errno 32] Broken pipe
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/apport_python_hook.py", line 38, in apport_excepthook
    from apport.packaging_impl import impl as packaging
ImportError: No module named apport.packaging_impl

Original exception was:
IOError: [Errno 32] Broken pipe

Martin Pitt (pitti) wrote :

This is quite inexplicable to me, I'm afraid. I committed trunk r1547 to paper over this (catch and abort on ImportError), to avoid disrupting other programs.

Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Low
status: Confirmed → Fix Committed

2009/9/3 Martin Pitt <email address hidden>:
> This is quite inexplicable to me, I'm afraid. I committed trunk r1547 to
> paper over this (catch and abort on ImportError), to avoid disrupting
> other programs.

Thanks. fwiw I haven't seen it in either karmic or jaunty for a few months.

--
Martin <http://launchpad.net/~mbp/>

Launchpad Janitor (janitor) wrote :
Download full text (3.3 KiB)

This bug was fixed in the package apport - 1.8.1-0ubuntu1

---------------
apport (1.8.1-0ubuntu1) karmic; urgency=low

  * New upstream bug fix release:
    - data/general-hooks/generic.py: Check $HOME, not /home for enough space.
      (LP: #422658)
    - launchpad.py: Intercept httplib2.ServerNotFoundError as well, to avoid
      crashes when being offline. (LP: #396276)
    - apport-cli: Save reports with .apport extension instead of .txt. Thanks
      to Steve Beattie! (LP: #401983)
    - fileutils.py, likely_packaged(): Ignored crashes in /var, packages don't
      ship executables there, and it creates false positives. (LP: #414368)
    - packaging-apt-dpkg.py, get_modified_files(): Fix crash with empty lines.
      (LP: #408280)
    - packaging-apt-dpkg.py: Use installed version instead of candidate
      version where appropriate. This also fixes a crash where an obsolete
      package is not available any more. (LP: #423511)
    - hookutils.py, attach_gconf(): Fix crash with keys which do not have a
      schema default. (LP: #422277)
    - launchpad.py: Remove LP #353805 workaround, seems fixed now.
    - launchpad.py: Talk to staging if $APPORT_STAGING is set.
    - launchpad.py: Explicitly supply content_type for addAttachment, current
      wadllib requires it now.
    - apport_python_hook.py: Paper over inexplicable import error.
      (LP: #348250)
    - apport_python_hook.py: Protect against nonexisting sys.argv.
      (LP: #418051)
    - apport/ui.py, load_report(): Check that report has ProblemType field.
      (LP: #198543)
    - ui.py: Fix handling of complete vs. reduced report size. (LP: #92653).
      This also fixes a race condition crash with os.path.getsize().
      (LP: #348137)
    - fi.po: Fix mistranslation of "&Cancel". (LP: #355303)
    - apport-{gtk,kde}: Check for having $DISPLAY at startup to avoid crashes.
      (LP: #411276)
    - report.py, add_gdb_info(): Fix race condition in unlink_core, thanks to
      Tommi Komulainen! (LP: #397945)
    - ui.py, load_report(): Robustify check whether program is still
      installed. (LP: #329184)
    - packaging-apt-dpkg.py, install_retracing_packages(): Install package for
      ExecutablePath/InterpreterPath if missing; this can happen with package
      hooks which reassing package
    - launchpad.py: Add a comment when marking a bug as a duplicate.
      (LP: #418871)
  * Move gdb dependency from apport to GUI packages to avoid pulling in gdb on
    Ubuntu server. Thanks to Steve Beattie! (LP: #354172)
  * ubuntu-bug: Fix handling of .crash file arguments, thanks to Marco
    Rodrigues for pointing this out! (LP: #422881)
  * debian/local/apport-collect: Set content_type and description, wadllib
    requires them now. (LP: #423512) Also drop the ASCII reencoding
    workaround, this doesn't seem to be necessary any more.
  * apport/hookutils.py, attach_conffiles(): Fix crash with obsolete
    conffiles. (LP: #412132)
  * debian/local/apport-collect: Do not upload data if the affected package
    isn't installed and there is no source package hook available either.
    (LP: #417277)
  * debian/local/ubuntu-bug: Accept .apport extension, too; thanks to Steve
    ...

Read more...

Changed in apport (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