Bug 242974 - hplip: traceback in hp-setup when adding a printer
Summary: hplip: traceback in hp-setup when adding a printer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 7
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
: 246342 (view as bug list)
Depends On:
Blocks: F7Update
TreeView+ depends on / blocked
 
Reported: 2007-06-06 18:59 UTC by Bernard Johnson
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version: 1.7.4a-4.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-11 15:20:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bernard Johnson 2007-06-06 18:59:13 UTC
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 21:04:29 UTC
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 21:39:37 UTC
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 23:16:12 UTC
*** Bug 246342 has been marked as a duplicate of this bug. ***

Comment 4 Tim Waugh 2007-06-30 23:16:59 UTC
Please try the test update:

  yum --enablrepo=updates-testing update 'hplip*' 'hpijs*' 'libsane-hpaio*'


Comment 5 Bernard Johnson 2007-07-04 19:28:29 UTC
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 10:38:42 UTC
What does 'cat /etc/hp/hplip.conf' say?

Comment 7 Bernard Johnson 2007-07-06 17:27:30 UTC
$ 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 15:48:45 UTC
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 18:33:19 UTC
(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 15:20:48 UTC
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.