Score:2

HPLIP Toolbox crashes on Ubuntu 23.04

by flag

I am using the HPLIP installed from repository, since the one from HPLIP download usually does not install, due to dependencies issues.

When I open the HPLIP Toolbox I get crash with main cause at /usr/share/hplip/toolbox.py. If I run this Phython I get:

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/share/hplip/toolbox.py", 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)
                  ^^^^^^^^^^^^^^^^^^^
NameError: name 'get_distro_std_name' is not defined. Did you mean: 'get_distro_name'?

The solution I implemented was to edit file /usr/share/hplip/base/password.py and replace get_distro_std_name() by the get_distro_name(), used on previous Ubuntu, 22.10.

Line 119:
From
        distro_name = get_distro_std_name(os_name)

To
        distro_name = get_distro_name().lower().replace(" ","")


Line 323
From
        distro_name = get_distro_std_name(os_name)

To
        distro_name = get_distro_name().lower()

How can this be reported to team in charge of HPLIP code in Ubuntu?

Regards

guiverc avatar
cn flag
If it's https://packages.ubuntu.com/lunar/hplip you mean, refer to the top right and click on *bug reports* and you'll get a new page of bugs, where you can check to see if its already reported, or click the *report a bug* top right to start a new bug report. Rather than start it online, I'd suggest using `ubuntu-bug hplip` on your terminal though. See https://help.ubuntu.com/community/ReportingBugs (*Include your suggested fix in the bug report*)
guiverc avatar
cn flag
Does this answer your question? [How do I report a bug?](https://askubuntu.com/questions/5121/how-do-i-report-a-bug)
Fernando Sprocati avatar
by flag
Thanks guiverc. This answer my question.
Score:3
by flag

The solution I implemented was to edit file /usr/share/hplip/base/password.py and replace get_distro_std_name() by the get_distro_name(), used on previous Ubuntu, 22.10.

Line 119: From distro_name = get_distro_std_name(os_name)

To distro_name = get_distro_name().lower().replace(" ","")

And Line 323 From distro_name = get_distro_std_name(os_name)

To distro_name = get_distro_name().lower()

刘金国 avatar
cn flag
Confirmed it works on my Ubuntu 23.04 Desktop. My device is HP Laserjet Tank MFP 2606sdw.
Score:-1
io flag

Followed the advice from Fernando Sprocati and now my HPLIP Toolbox launches. This was on a completely clean installation of 23.04.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.