Cannot add HP M251n printer from GUI HP Setup

Bug #1852469 reported by Patrick Spousta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

I run HPLIP installer on Linux Mint 19.2 for the first time. Everything was good and at the end it started GUI for HP Setup. The network printer was not automatically recognized and I had to put printer's IP address in Advanced Options. then it was correctly recognized as HP LaserJet 200 Color m251n. After I clicked "Next" button nothing happend and the button changed to "AddPrinter". Then I clicked "AddPrinter" and nothing happened. In the original terminal window I found following output

Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1307, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 713, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui4/setupdialog.py", line 792, in findPrinterPPD
    self.print_ppd = cups.getPPDFile2(self.mq, self.model, self.ppds)
  File "/usr/share/hplip/prnt/cups.py", line 492, 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'

The GUI HP Setup is stuck in this step and printer cannot be added.

Revision history for this message
brian_p (claremont102) wrote :

Is your priority being able to print or run HPLIP installer?

--
Brian.

Revision history for this message
Patrick Spousta (d-patrick-1) wrote : Re: [Bug 1852469] Re: Cannot add HP M251n printer from GUI HP Setup

Hello Brian
printing is priority of course and I was able to add the printer via
interactive configuration.
I thought it's a good idea to report thing which does not work as expected
and understand that this is "cosmetic" not critical issue.

PAT

čt 14. 11. 2019 v 0:10 odesílatel brian_p <email address hidden>
napsal:

> Is your priority being able to print or run HPLIP installer?
>
> --
> Brian.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1852469
>
> Title:
> Cannot add HP M251n printer from GUI HP Setup
>
> Status in HPLIP:
> New
>
> Bug description:
> I run HPLIP installer on Linux Mint 19.2 for the first time.
> Everything was good and at the end it started GUI for HP Setup. The
> network printer was not automatically recognized and I had to put
> printer's IP address in Advanced Options. then it was correctly
> recognized as HP LaserJet 200 Color m251n. After I clicked "Next"
> button nothing happend and the button changed to "AddPrinter". Then I
> clicked "AddPrinter" and nothing happened. In the original terminal
> window I found following output
>
> Traceback (most recent call last):
> File "/usr/share/hplip/ui4/setupdialog.py", line 1307, in
> NextButton_clicked
> self.showAddPrinterPage()
> File "/usr/share/hplip/ui4/setupdialog.py", line 713, in
> showAddPrinterPage
> self.findPrinterPPD()
> File "/usr/share/hplip/ui4/setupdialog.py", line 792, in findPrinterPPD
> self.print_ppd = cups.getPPDFile2(self.mq, self.model, self.ppds)
> File "/usr/share/hplip/prnt/cups.py", line 492, 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'
>
> The GUI HP Setup is stuck in this step and printer cannot be added.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/hplip/+bug/1852469/+subscriptions
>

Revision history for this message
Patrick Spousta (d-patrick-1) wrote :

After emulation of the cups.py script activity I identified 6 HP devices not having defined 'Family-class' in the PPD files. My printer is similar to the model M251nw which has defined 'Family-class' as array ['Undefined'] so I did workaround which could work for all the six devices. See the patch attached.

FYI devices without Family-class defined in PPD are
('hp_pagewide_p55250')
('deskjet_950c')
('hp_laserjet_pro_mfp_m225dn')
('hp_laserjet_pro_mfp_m225dw')
('hp_laserjet_200_color_m251n')
('officejet_j3600_series')

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.