Comment 0 for bug 1745835

Revision history for this message
Erez Strauss (z999) wrote :

Setup a new HP MFP M281 (M278-M281) fails due to a missing line in the printer entry in file:
/usr/share/hplip/data/models/models.dat

See below for a solution (or workaround), as I don't know to which family-class it belongs.

The failure ends with core dump:

$ hp-setup

HP Linux Imaging and Printing System (ver. 3.17.11)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 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.

Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)

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

Copyright (c) 2001-15 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.17.11)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-15 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:
Receiving digital keys: /usr/bin/gpg --homedir /home/erez/.hplip/.gnupg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.17.11 Plugin Self Extracting Archive..................................................

HP Linux Imaging and Printing System (ver. 3.17.11)
Plugin Installer ver. 3.0

Copyright (c) 2001-15 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.

Plug-in version: 3.17.11
Installed HPLIP version: 3.17.11
Number of files to install: 42

note: Using PyQt5

Done.
 Plug-in installation successful

Done.
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 711, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui5/setupdialog.py", line 790, 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'
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 711, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui5/setupdialog.py", line 790, 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'
Aborted (core dumped)

The solution:

Add the following line for the printer entry:
family-class=Undefined

So the entry starts:
[hp_colorlaserjet_mfp_m278-m281]
align-type=0
clean-type=0
color-cal-type=0
copy-type=0
embedded-server-type=1
fax-type=7
fw-download=False
icon=hp_color_laserjet_cm1312_mfp.png
io-mfp-mode=1
io-mode=1
io-support=14
job-storage=0
linefeed-cal-type=0
family-class=Undefined
model1=HP Color LaserJet MFP M278-M281
monitor-type=0
panel-check-type=0
pcard-type=0