Score:2

HPLIP crashes when setting up printer (Ubuntu 22.10)

gb flag

I'm using Ubuntu 22.10 and I'm trying to set up my HP printer with HPLIP.

First I set up manually putting in the IP-address of the printer and it recognises the printer. However, once I click on "next" the HPLIP freezes.

I don't know if this will help, but when I give in hp-doctor in the terminal it throws an error:

-Traceback (most recent call last):
  File "/usr/bin/hp-doctor", line 276, in <module>
    dep.core.init()
  File "/usr/share/hplip/installer/core_install.py", line 523, in init
    self.get_distro()
  File "/usr/share/hplip/installer/core_install.py", line 661, in get_distro
    if 'MX' in distro_release_name:
NameError: name 'distro_release_name' is not defined
br flag
Printer model and connection method?
AlexLee avatar
gb flag
Yes of course, my HP OfficeJet Pro 8022 is connected via WiFi. My PC is connected via ethernet to router (don't know if that makes a difference).
Score:0
nz flag

For those who requires HPLIP for their printer / scanner, here is a workaround to fix the bug in the software:

sudo sed -i "s/get_distro_std_name(os_name)/get_distro_name()/" /usr/share/hplip/base/password.py

This will replace occurrences of the get_distro_std_name(os_name) function by the new get_distro_name() function. It seems that HP devs forgot two occurrences when they refactored this file :)

Score:0
br flag

This device is designed for driverless printing. HPLIP is not needed. Executing driverless gives a URI. Set up a print queue with

lpadmin -p PRINTER_NAME -v "URI" -E -m everywhere

Substitute for URI, of course. PRINTER_NAME can be what you choose. Test printing with

lp -d PRINTER_NAME /etc/nsswitch.conf

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.