hp-toolbox fails on load due to call to undefined "get_distro_std_name' function

Bug #2006460 reported by Peter Rhone
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
hplip (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When starting hp-toolbox from the GUI, nothing happens. From the CLI I get the information :

HP Linux Imaging and Printing System (ver. 3.22.10)
HP Device Manager ver. 15.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 280, in <module>
    toolbox = ui.DevMgr5(__version__, device_uri, None)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/ui5/devmgr5.py", line 238, in __init__
    core = CoreInstall(MODE_CHECK)
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/installer/core_install.py", line 240, in __init__
    self.passwordObj = password.Password(ui_mode)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/base/password.py", line 94, in __init__
    self.__readAuthType() # self.__authType
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/base/password.py", line 119, in __readAuthType
    distro_name = get_distro_std_name(os_name)
                  ^^^^^^^^^^^^^^^^^^^

Changing the instances of get_distro_std_name(os_name) to get_distro_name() as suggested resolved the bug.

When installing the plugin for the scanner, the same issue crops up again, here at line 322. An identical substitution allows the plugin installer to complete successfully.

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: hplip-data 3.22.10+dfsg0-1 [modified: usr/share/hplip/base/password.py]
ProcVersionSignature: Ubuntu 5.19.0-26.27-generic 5.19.7
Uname: Linux 5.19.0-26-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.24.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CupsErrorLog:
 W [07/Feb/2023:11:47:17 +0100] Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103
 W [07/Feb/2023:11:47:23 +0100] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'HP_Color_LaserJet_MFP_M281fdw_5543F1-Gray..\' already exists
 W [07/Feb/2023:11:47:23 +0100] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'HP_Color_LaserJet_MFP_M281fdw_5543F1-DeviceN..\' already exists
 E [07/Feb/2023:11:47:24 +0100] [Client 17] Returning IPP client-error-not-possible for CUPS-Create-Local-Printer (ipp://localhost/) from localhost.
CurrentDesktop: ubuntu:GNOME
Date: Tue Feb 7 12:10:42 2023
InstallationDate: Installed on 2020-06-20 (961 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Alpha amd64 (20200609)
Lpstat:
 device for HP_Color_LaserJet_MFP_M281fdw_5543F1: implicitclass://HP_Color_LaserJet_MFP_M281fdw_5543F1/
 device for HP_ColorLaserJet_MFP_M278-M281: hp:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.0.102
 device for HP_ColorLaserJet_MFP_M278-M281_fax: hpfax:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.0.102
MachineType: System manufacturer System Product Name
PackageArchitecture: all
Papersize: a4
PpdFiles:
 Error: command ['fgrep', '-H', '*NickName', '/etc/cups/ppd/HP_Color_LaserJet_MFP_M281fdw_5543F1.ppd', '/etc/cups/ppd/HP_ColorLaserJet_MFP_M278-M281.ppd', '/etc/cups/ppd/HP_ColorLaserJet_MFP_M278-M281_fax.ppd'] failed with exit code 2: grep: /etc/cups/ppd/HP_Color_LaserJet_MFP_M281fdw_5543F1.ppd: Permission denied
 grep: /etc/cups/ppd/HP_ColorLaserJet_MFP_M278-M281.ppd: Permission denied
 grep: /etc/cups/ppd/HP_ColorLaserJet_MFP_M278-M281_fax.ppd: Permission denied
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.19.0-26-generic root=UUID=05f71b34-3a5a-42e5-adb6-8a11af401188 ro quiet splash nvidia-drm.modeset=1 vt.handoff=7
SourcePackage: hplip
UpgradeStatus: Upgraded to lunar on 2022-12-21 (47 days ago)
dmi.bios.date: 10/27/2022
dmi.bios.release: 5.17
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 4408
dmi.board.asset.tag: Default string
dmi.board.name: ROG STRIX X570-F GAMING
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4408:bd10/27/2022:br5.17:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnROGSTRIXX570-FGAMING:rvrRevX.0x:cvnDefaultstring:ct3:cvrDefaultstring:skuSKU:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Peter Rhone (prhone-gmail) wrote :
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
Revision history for this message
Massimiliano Agosti (magosti) wrote :

I can't download hp plugin (kubuntu 23.04)

HP Linux Imaging and Printing System (ver. 3.22.10)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

HP Linux Imaging and Printing System (ver. 3.22.10)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Checking for network connection...
Downloading plug-in from:
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/plugindialog.py", line 248, in NextButton_clicked
    status, download_plugin_file, error_str = self.pluginObj.download(self.plugin_path,self.plugin_download_callback)
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/installer/pluginhandler.py", line 257, in download
    core = core_install.CoreInstall()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/installer/core_install.py", line 240, in __init__
    self.passwordObj = password.Password(ui_mode)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/base/password.py", line 94, in __init__
    self.__readAuthType() # self.__authType
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/base/password.py", line 119, in __readAuthType
    distro_name = get_distro_std_name(os_name)
                  ^^^^^^^^^^^^^^^^^^^
NameError: name 'get_distro_std_name' is not defined. Did you mean: 'get_distro_name'?

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.