config_usb_printer.py crashed with ImportError in /usr/share/hplip/base/status.py: No module named hpmudext

Bug #1425812 reported by Wolfgang
76
This bug affects 10 people
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
Unassigned
hplip (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

connected usb lasercolorprinter and crash report startet up. printer function well also printer output!

ProblemType: Crash
DistroRelease: Ubuntu 15.04
Package: hplip-data 3.15.2-0ubuntu2
ProcVersionSignature: Ubuntu 3.18.0-14.15-generic 3.18.7
Uname: Linux 3.18.0-14-generic x86_64
ApportVersion: 2.16.1-0ubuntu2
Architecture: amd64
Date: Thu Feb 26 07:01:19 2015
ExecutablePath: /usr/share/hplip/config_usb_printer.py
InstallationDate: Installed on 2014-12-15 (72 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
InterpreterPath: /usr/bin/python2.7
Lpstat: device for Hewlett-Packard-hp-color-LaserJet-2550-series: usb://HP/color%20LaserJet%202550%20series?serial=00CNHHB25347
MachineType: Acer Aspire E1-572
PackageArchitecture: all
Papersize: a4
PpdFiles: Hewlett-Packard-hp-color-LaserJet-2550-series: HP Color LaserJet 2550 Series Postscript (recommended)
ProcCmdline: /usr/bin/python /usr/bin/hp-config_usb_printer 001:002
ProcEnviron:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.18.0-14-generic root=UUID=0d5a5183-1272-4365-8413-bcfc4f7554ec ro rootflags=sync quiet splash vt.handoff=7
PythonArgs: ['/usr/bin/hp-config_usb_printer', '001:002']
SourcePackage: hplip
Title: config_usb_printer.py crashed with ImportError in /usr/share/hplip/base/status.py: No module named hpmudext
UpgradeStatus: Upgraded to vivid on 2015-02-23 (2 days ago)
UserGroups:

dmi.bios.date: 09/02/2014
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: V2.17
dmi.board.asset.tag: Type2 - Board Asset Tag
dmi.board.name: EA50_HW
dmi.board.vendor: Acer
dmi.board.version: V2.17
dmi.chassis.asset.tag: Chassis Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnInsydeCorp.:bvrV2.17:bd09/02/2014:svnAcer:pnAspireE1-572:pvrV2.17:rvnAcer:rnEA50_HW:rvrV2.17:cvnAcer:ct10:cvrChassisVersion:
dmi.product.name: Aspire E1-572
dmi.product.version: V2.17
dmi.sys.vendor: Acer

Revision history for this message
Wolfgang (wolfganghurlimann) wrote :
information type: Private → Public
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please run the commands

dpkg -l | grep hplip
dpkg -l | grep hpmudext

in a terminal window. Post the output here.

Changed in hplip (Ubuntu):
status: New → Incomplete
Changed in hplip:
status: New → Incomplete
Revision history for this message
Wolfgang (wolfganghurlimann) wrote : Re: [Bug 1425812] Re: config_usb_printer.py crashed with ImportError in /usr/share/hplip/base/status.py: No module named hpmudext

ii hplip 3.15.2-0ubuntu2
                           amd64 HP Linux Printing and Imaging
System (HPLIP)
ii hplip-data 3.15.2-0ubuntu2
                           all HP Linux Printing and Imaging -
data files

Am 26.02.2015 um 18:26 schrieb Till Kamppeter:
> Please run the commands
>
> dpkg -l | grep hplip
> dpkg -l | grep hpmudext
>
> in a terminal window. Post the output here.
>
>
> ** Changed in: hplip (Ubuntu)
> Status: New => Incomplete
>
> ** Changed in: hplip
> Status: New => Incomplete
>

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I got this bug on my box (Utopic, but with the Vivid packages of HPLIP) and checked what I have exactly installed and all HPLIP packages including the hpmudext packages are of version 3.15.2-0ubuntu2, so there is no version mismatch. In addition, I have installed all binary packages which get built from the hplip source package, so I must have installed all files of the upstream "make install" and so no file should be missing.

I tried also running "python3" and then on the Python command line "import hpmudext" which works whereas running "python" (=Python 2.x) and "import hpmudext" fails, giving the impression that something runs accidentally under Python2.

For me it looks like that something went with the Python3 transition by upstream, so to the HPLIP developers at HP, please check.

Note also that during the package build I modify the shebangs of .py files from /usr/bin/python to /usr/bin/python3 to assure that everything is running under Python3, and config_usb_printer.py has a Python3 shebang in the Ubuntu package.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

It is actually caused by accidentally running under Python2, as the apport info in the initial description contains:

InterpreterPath: /usr/bin/python2.7

The only strange thing is how this can happen with the Python3 shebang in config_usb_printer.py.

Revision history for this message
Apport retracing service (apport) wrote : This bug is a duplicate

Thank you for taking the time to report this crash and helping to make this software better. This particular crash has already been reported and is a duplicate of bug #1419888, so is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

tags: removed: need-duplicate-check
Changed in hplip (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Changed the "master bug" of this series of duplicate bugs from bug 1419888 to this bug, so that my comments get more visible.

Revision history for this message
Dave Stroud (bigdavesr) wrote :

In my case I think this is happenes because I have hplip set to be off at boot.It is trying to start anyway and then crashes.

Revision history for this message
elhoir (jfarroyo82) wrote :

my results:

elhoir@elhoir-desktop:~$ dpkg -l | grep hplip
ii hplip 3.15.2-0ubuntu2 amd64 HP Linux Printing and Imaging System (HPLIP)
ii hplip-data 3.15.2-0ubuntu2 all HP Linux Printing and Imaging - data files
elhoir@elhoir-desktop:~$ dpkg -l | grep hpmudext
elhoir@elhoir-desktop:~$

Revision history for this message
Albert Astals Cid (aacid) wrote :

> The only strange thing is how this can happen with the Python3 shebang in config_usb_printer.py.

Because it's not being invoked directly but by calling
    python config_usb_printer.py
And python is always python2, the question here is who is doing the invokation.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Ok, found the culprit,

     /lib/udev/rules.d/56-hpmud.rules

has

ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/python /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi &'"

given that /usr/bin/hp-config_usb_printer is executable by itself the

/usr/bin/python

should just be dropped.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

To the HPLIP developers at HP:

Please go through the whole HPLIP and take care that a script is always called directly:

<path>/<script> <command line parameters>

and never by explicitly calling the interpreter like

<interpreter> <path>/<script> <command line parameters>

This way we can simply control by the shebang in the script which interpreter version or flavor is used. So the same interpreter gets used both when the user explicitly calls the script from the command line and when another script or program calls the script.

Changed in hplip (Ubuntu):
status: Incomplete → Triaged
Changed in hplip:
status: Incomplete → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 3.15.2-0ubuntu4

---------------
hplip (3.15.2-0ubuntu4) vivid; urgency=low

  * debian/rules: Remove explicit call of /usr/bin/python when calling the
    /usr/bin/hp-config_usb_printer script so that the shebang does not get
    overridden (LP: #1425812).
 -- Till Kamppeter <email address hidden> Tue, 17 Mar 2015 16:04:00 +0100

Changed in hplip (Ubuntu):
status: Triaged → Fix Released
Changed in hplip:
status: Confirmed → Fix Released
Revision history for this message
Dennis (deki24) wrote :

I've updated to 3.15.7 and this issue still occurs. There is no file /lib/udev/rules.d/*hpmud.rules that I can edit.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Dennis, the file /lib/udev/rules.d/56-hpmud.rules is part of the "hplip" package. Make sure the "hplip" package is installed. If it is already installed, run

sudo apt-get install --reinstall hplip

to refresh its installation.

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.