toolbox.py crashed with NameError in __readAuthType(): name 'get_distro_std_name' is not defined

Bug #2012178 reported by Andrew Eddinger
62
This bug affects 11 people
Affects Status Importance Assigned to Milestone
hplip (Ubuntu)
Fix Released
High
Unassigned
Lunar
Fix Released
High
Till Kamppeter

Bug Description

[ Impact ]

HP's GUI tool hp-toolbox does not start at all, independent which printer(s) is used.

With this users lose GUI-based maintenance functionality like ink level check, print head cleaning, ...

As a workaround on all network printers (independent whether they are driverless IPP or not) the printer's web administration interface can be used, going to http://HOSTNAME/ with a browser, HOSTNAME being host name or IP of the printer. On USB only driverless printers allow access to the web administration interface, via http://localhost:60000/, but most modern printers are driverless.

hp-toolbox only supports HP printers, no other manufacturers.

Also, hp-toolbox, being part of hplip-gui is only used by very few users, as it is not installed by default.

Printing and scanning is not affected. Your printer gets set up fully automatically or you can set up as any non-HP printer with GNOME Control Center, system-config-printer, or via HTTP://localhost:631/.

Scanners in HP's devices will get automatically discovered by scanning frontends, like simple-scan.

[ Test plan ]

Start the toolbox with

   hp-toolbox

Without the fix you will get the crash mentioned in the title of this bug report. With the SRU applied, the toolbox starts normally and can be used.

This test can be done independently of whether one has an HP printer or not.

[ Where problems could occur ]

The changes are very small and easy to understand, so the risk of a regression is low, and as this is code for HPLIP's GUI there cannot happen more than now, that the GUI tools crash. The patch only applies to GUI code, printing and scanning cannot get affected by it.

[ Original description ]

Error occurred after installing hplip-gui

ProblemType: Crash
DistroRelease: Ubuntu 23.04
Package: hplip-data 3.22.10+dfsg0-1
ProcVersionSignature: Ubuntu 6.1.0-16.16-generic 6.1.6
Uname: Linux 6.1.0-16-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.26.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Sun Mar 19 05:07:34 2023
ExecutablePath: /usr/share/hplip/toolbox.py
InstallationDate: Installed on 2023-03-18 (0 days ago)
InstallationMedia: Kubuntu 23.04 "Lunar Lobster" - Alpha amd64 (20230318)
InterpreterPath: /usr/bin/python3.11
JournalErrors: -- No entries --
Lpstat: device for HP_Color_LaserJet_Pro_MFP_M177fw_0342B1: implicitclass://HP_Color_LaserJet_Pro_MFP_M177fw_0342B1/
MachineType: HP HP ZBook 17 G4
PackageArchitecture: all
Papersize: letter
PpdFiles: Error: command ['fgrep', '-H', '*NickName', '/etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fw_0342B1.ppd'] failed with exit code 2: grep: /etc/cups/ppd/HP_Color_LaserJet_Pro_MFP_M177fw_0342B1.ppd: Permission denied
ProcCmdline: /usr/bin/python3 /usr/bin/hp-toolbox
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 XDG_RUNTIME_DIR=<set>
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.1.0-16-generic root=UUID=20a0c66a-2dc4-41ec-a5f0-7eb86e995862 ro quiet splash vt.handoff=7
Python3Details: /usr/bin/python3.11, Python 3.11.2, python3-minimal, 3.11.2-1
PythonArgs: ['/usr/bin/hp-toolbox']
PythonDetails: N/A
SourcePackage: hplip
Title: toolbox.py crashed with NameError in __readAuthType(): name 'get_distro_std_name' is not defined
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo users
dmi.bios.date: 04/08/2022
dmi.bios.release: 1.41
dmi.bios.vendor: HP
dmi.bios.version: P70 Ver. 01.41
dmi.board.name: 8270
dmi.board.vendor: HP
dmi.board.version: KBC Version 46.80
dmi.chassis.type: 10
dmi.chassis.vendor: HP
dmi.ec.firmware.release: 70.128
dmi.modalias: dmi:bvnHP:bvrP70Ver.01.41:bd04/08/2022:br1.41:efr70.128:svnHP:pnHPZBook17G4:pvr:rvnHP:rn8270:rvrKBCVersion46.80:cvnHP:ct10:cvr:skuY3J83AV:
dmi.product.family: 103C_5336AN
dmi.product.name: HP ZBook 17 G4
dmi.product.sku: Y3J83AV
dmi.sys.vendor: HP

Revision history for this message
Andrew Eddinger (genesius) wrote :
tags: removed: need-duplicate-check
Changed in hplip (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in hplip (Ubuntu):
status: New → Confirmed
information type: Private → Public
Changed in hplip (Ubuntu):
importance: Medium → High
assignee: nobody → Till Kamppeter (till-kamppeter)
Changed in hplip (Ubuntu Lunar):
assignee: nobody → Till Kamppeter (till-kamppeter)
Changed in hplip (Ubuntu):
assignee: Till Kamppeter (till-kamppeter) → nobody
Changed in hplip (Ubuntu Lunar):
importance: Undecided → High
Changed in hplip (Ubuntu):
status: Confirmed → Fix Committed
Changed in hplip (Ubuntu Lunar):
status: New → Triaged
Revision history for this message
Joseph Yasi (joe-yasi) wrote :

Can this be backported to Lunar. I tested hplip 3.22.10+dfsg0-2 on Lunar, and it fixes the issue.

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

3.22.10+dfsg0-2 got already synced from Debian into Mantic, so it is fixed in Mantic.

Changed in hplip (Ubuntu):
status: Fix Committed → Fix Released
Changed in hplip (Ubuntu Lunar):
status: Triaged → In Progress
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Andrew, or anyone else affected,

Accepted hplip into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/hplip/3.22.10+dfsg0-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in hplip (Ubuntu Lunar):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Jarl (jarl-dk) wrote :

I have tested the proposed package and it solves the problem. Thanks.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I can confirm that hplip-gui 3.22.10+dfsg0-1ubuntu1 from lunar-proposed fixed the startup problem as outlined in the test plan.

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

This bug was fixed in the package hplip - 3.22.10+dfsg0-1ubuntu1

---------------
hplip (3.22.10+dfsg0-1ubuntu1) lunar; urgency=medium

  * SRU for LP: #2012178

  [ Thorsten Alteholz ]
  * rework patch that uses distro module (0075 at the moment)
    Thanks to Mark Hindley and others for detecting and fixing this!
    (Closes: #1010805, #1029459, #1030043, #1031233, #1031784)

 -- Till Kamppeter <email address hidden> Fri, 16 Jun 2023 23:59:59 +0200

Changed in hplip (Ubuntu Lunar):
status: Fix Committed → Fix Released
tags: added: verification-done-lunar
removed: verification-needed-lunar
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.