Bug 242974 - hplip: traceback in hp-setup when adding a printer
hplip: traceback in hp-setup when adding a printer
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: hplip (Show other bugs)
7
All Linux
low Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
: 246342 (view as bug list)
Depends On:
Blocks: F7Update
  Show dependency treegraph
 
Reported: 2007-06-06 14:59 EDT by Bernard Johnson
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.7.4a-4.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-11 11:20:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bernard Johnson 2007-06-06 14:59:13 EDT
Description of problem:

Adding a printer causes a traceback in hp-setup

[root@localhost ~]# hp-setup -i 192.168.1.11

HP Linux Imaging and Printing System (ver. 1.7.2)
Printer/Fax Setup Utility ver. 4.4

Copyright (c) 2003-6 Hewlett-Packard 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.


Setting up device: hp:/net/HP_Color_LaserJet_2840?ip=192.168.1.11

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept
the default.)


PRINT QUEUE SETUP

Please enter a name for this print queue (m=use model
name:'HP_Color_LaserJet_2840'*, q=quit) ?
Using queue name: HP_Color_LaserJet_2840

Found a possible PPD file:
/usr/share/cups/model/foomatic-db-ppds/HP/color_laser/HP_Color_LaserJet_2800.ppd.gz
Desc: HP Color LaserJet 2800 Series Postscript

Note: The model number may vary slightly from the actual model number on the device.

Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?
Enter additonal information or notes for this printer (q=quit) ?

Adding print queue to CUPS:
Device URI: hp:/net/HP_Color_LaserJet_2840?ip=192.168.1.11
Queue name: HP_Color_LaserJet_2840
PPD file:
/usr/share/cups/model/foomatic-db-ppds/HP/color_laser/HP_Color_LaserJet_2800.ppd.gz
Location: 
Information: 
Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 623, in <module>
    cups.addPrinter(printer_name, print_uri, location, print_ppd, info)
TypeError: addPrinter() takes exactly 6 arguments (5 given)
[root@localhost ~]#

Version-Release number of selected component (if applicable):
hplip-1.7.2-10.fc7

How reproducible:
Always
Comment 1 Dwayne Bailey 2007-06-11 17:04:29 EDT
This only affects interactive mode i.e. -i

The missing paramtere is 'model' by adding that missing parameter you expose the
next issue.  Which is that when you select the PPD file it uses the PPD file
description instead of the PPD file location.  Thus it barfs when it can't find
the PPD file (since it is trying to do os.file.exists the description of the PPD
file).

Hope that helps in the fixing.  I installed hplip-gui so that I didn't need to
do this on the command line.  Its a work around for those with a GUI.
Comment 2 Bernard Johnson 2007-06-11 17:39:37 EDT
I added the extra parameter as '' (not having time to look up the interface
def.), and it WorksForMe if you have to use interactive mode.

If someone can point me to the cups api documents, I would probably produce a
real fix ;)
Comment 3 Tim Waugh 2007-06-30 19:16:12 EDT
*** Bug 246342 has been marked as a duplicate of this bug. ***
Comment 4 Tim Waugh 2007-06-30 19:16:59 EDT
Please try the test update:

  yum --enablrepo=updates-testing update 'hplip*' 'hpijs*' 'libsane-hpaio*'
Comment 5 Bernard Johnson 2007-07-04 15:28:29 EDT
hp-setup -i 192.168.1.11

HP Linux Imaging and Printing System (ver. x.x.x)
Printer/Fax Setup Utility ver. 4.5

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

error: I/O Error: /root/data/models/models.dat (No such file or directory)

Setting up device: hp:/net/HP_Color_LaserJet_2840?ip=192.168.1.11

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept
the default.)

error: I/O Error: /root/data/models/models.dat (No such file or directory)
error: Unsupported printer model.
Comment 6 Tim Waugh 2007-07-06 06:38:42 EDT
What does 'cat /etc/hp/hplip.conf' say?
Comment 7 Bernard Johnson 2007-07-06 13:27:30 EDT
$ cat /etc/hp/hplip.conf
# hplip.conf

[hpiod]
# port=0 (dynamic IP port)
port=2208
[hpssd]
# port=0 (dynamic IP port)
port=2207

[hplip]
version=1.7.4a
jdprobe=0

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/foomatic/db/source/PPD/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-1.7.4a

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=1
pp-build=1
gui-build=1
scanner-build=1
fax-build=1
cups11-build=0
installinitd=
chkconfig=/sbin/chkconfig
internal-tag=1.7.4.13
Comment 8 Fedora Update System 2007-07-09 11:48:45 EDT
hplip-1.7.4a-4.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Bernard Johnson 2007-07-09 14:33:19 EDT
(In reply to comment #8)
> hplip-1.7.4a-4.fc7 has been pushed to the Fedora 7 testing repository.  If
problems still persist, please make note of it in this bug report.

That seems to have fixed it.
Comment 10 Fedora Update System 2007-07-11 11:20:48 EDT
hplip-1.7.4a-4.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.