Error's adding a network printer after hplib installation

Asked by K Homer

On a fresh install of Ubuntu 22.04.03 I have installed hplib-3.23.5

The installation appears to work correctly, however when I get to the stage of running the GUI to install my Networked printer I get a warning message telling me there is a KeyError: 'family class'

The printer I have connected to my network is an HP LaserJet 200 color M251n

After investigating the issue on the internet I came across a message recommending that the 'family-class' variable in the models.dat should be set to Undefined.

When I checked the models.dat file the closest printer i could find to mine was one called 'hp_laserjet_200_color_m251nw'

This already has the family-class variable set to Undefined.

Running the 'hp-setup' command the following happens

The first screen lets me select the type of printer, as my printer is connected to the network. I select the second option. Then press next.

The software searches for the printer and find my printer at the right IP address.

I select my printer from the list and press next.

At this point i get the family-class warning and the next button changes to 'Add Printer'.

I press 'Add Printer' the software thinks for a short time and then stops, in the background I get another family-class warning and the screen does not change.

At this point I cannot progress the installation of the printer. I have added the export of the terminal window below showing the messages i get.

Please could you help me resolve this problem.

Kind regards

Keith

Terminal export

$ hp-setup

HP Linux Imaging and Printing System (ver. 3.23.5)
Printer/Fax Setup Utility ver. 9.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.

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=mdns)
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1395, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 709, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui5/setupdialog.py", line 798, in findPrinterPPD
    self.print_ppd = cups.getPPDFile2(
  File "/usr/share/hplip/prnt/cups.py", line 540, in getPPDFile2
    family_class=getFamilyClassName(model)
  File "/usr/share/hplip/prnt/cups.py", line 182, in getFamilyClassName
    family_type= dict[m]['family-class']
KeyError: 'family-class'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
PermissionError: [Errno 13] Permission denied: '/var/crash/_usr_share_hplip_setup.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1395, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 709, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui5/setupdialog.py", line 798, in findPrinterPPD
    self.print_ppd = cups.getPPDFile2(
  File "/usr/share/hplip/prnt/cups.py", line 540, in getPPDFile2
    family_class=getFamilyClassName(model)
  File "/usr/share/hplip/prnt/cups.py", line 182, in getFamilyClassName
    family_type= dict[m]['family-class']
KeyError: 'family-class'
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1395, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 709, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui5/setupdialog.py", line 798, in findPrinterPPD
    self.print_ppd = cups.getPPDFile2(
  File "/usr/share/hplip/prnt/cups.py", line 540, in getPPDFile2
    family_class=getFamilyClassName(model)
  File "/usr/share/hplip/prnt/cups.py", line 182, in getFamilyClassName
    family_type= dict[m]['family-class']
KeyError: 'family-class'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
PermissionError: [Errno 13] Permission denied: '/var/crash/_usr_share_hplip_setup.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1395, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 709, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui5/setupdialog.py", line 798, in findPrinterPPD
    self.print_ppd = cups.getPPDFile2(
  File "/usr/share/hplip/prnt/cups.py", line 540, in getPPDFile2
    family_class=getFamilyClassName(model)
  File "/usr/share/hplip/prnt/cups.py", line 182, in getFamilyClassName
    family_type= dict[m]['family-class']
KeyError: 'family-class'

Question information

Language:
English Edit question
Status:
Open
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask K Homer for more information if necessary.

To post a message you must log in.