ImportError: No module named apport

Bug #1171344 reported by David Henningsson
34
This bug affects 8 people
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Fix Released
Medium
Martin Pitt
virtualbox (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When trying to install a home-built dkms module:

Traceback (most recent call last):
  File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module>
    import apport
ImportError: No module named apport

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: dkms 2.2.0.3-1.1ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-19.29-generic 3.8.8
Uname: Linux 3.8.0-19-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.9.2-0ubuntu8
Architecture: amd64
CasperVersion: 1.330
Date: Mon Apr 22 07:54:53 2013
LiveMediaBuild: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130421)
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: dkms
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
David Henningsson (diwic) wrote :
summary: - DKMS does not depend on apport python
+ DKMS does not depend on python-apport
Revision history for this message
Martin Pitt (pitti) wrote : Re: DKMS does not depend on python-apport

This also breaks ubuntu-drivers-common's autopkgtest.

Changed in dkms (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

dkms shouldn't explicitly depend on python3-apport IMHO, and even less so use the Python 2 version. The error is that dkms calls the hook through "python" instead of just as an executable.

summary: - DKMS does not depend on python-apport
+ ImportError: No module named apport
Martin Pitt (pitti)
Changed in dkms (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dkms - 2.2.0.3-1.1ubuntu4

---------------
dkms (2.2.0.3-1.1ubuntu4) saucy; urgency=low

  * apport_python3.patch: Fix bug links in header.
  * apport_python3.patch: Call package hook through python3, not python.
    (LP: #1171344)
 -- Martin Pitt <email address hidden> Wed, 29 May 2013 08:31:34 +0200

Changed in dkms (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Onestone (onestone) wrote :

This bug was reported against Raring, but the fix was only released in Saucy. Shouldn't the fixed package be released in Raring as well?

Revision history for this message
David Henningsson (diwic) wrote :

@Onestone, only if it is important enough - see https://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
Peter Thompson (peter-macleod-thompson) wrote :

Hi - Can I get this fix (or a workaround)? Have ASUS Notebook S56C running Ubuntu 13.04 and need this to get SD card reader working - see fix for bug 971876 notes below.....

We created a DKMS module .deb to make install easier until the driver can be included in Ubuntu. Commands:

wget http://planet76.com/drivers/realtek/rts-bpp-dkms_1.1_all.deb
sudo apt-get install dkms
sudo dpkg -i rts-bpp-dkms_1.1_all.deb
echo 'DRIVERS=="rts_bpp", ENV{ID_DRIVE_FLASH_SD}="1"' | sudo tee -a /lib/udev/rules.d/81-udisks-realtek.rules

Revision history for this message
fLiDe (flideravi) wrote :

Hi,

I am in need to install the ALPS psmouse driver and solution is provided by Dave (see bug 1041916).
But, following instructions i am unable to run dkms properly. I keep getting the following message

make KERNELRELEASE=3.8.0-19-generic -C /lib/modules/3.8.0-19-generic/build M=/var/lib/dkms/psmouse/alps-1.3/build/src psmouse.ko....(bad exit status: 2)
Traceback (most recent call last):
  File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module>
    import apport
ImportError: No module named apport
Error! Bad return status for module build on kernel: 3.8.0-19-generic (x86_64)

I am running Raring.
Is there any way to update DKMS to the above released patch with out disturbing the stable release updates set for raring?

Thanks

Revision history for this message
nAndrade (bugsubuntu-nicoandra) wrote :

Hi

I'm also affected, running Raring as of now. And connected to a wired network as I can not install the Wireless drivers I kept in a .deb on my HD for this kind of situations. Upgrading kernel requires reinstalling the .deb for Wireless. But now I'm totally caught.

Revision history for this message
Oliver (t.raum) wrote :

@fLiDe
@nAndrade

here you find the saucy diff: http://launchpadlibrarian.net/140983674/dkms_2.2.0.3-1.1ubuntu3_2.2.0.3-1.1ubuntu4.diff.gz

I for my part just changed `python` into `python3` in dkms' report_build_problem function...

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

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

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