Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147515 - net-print/hplip-0.9.7 - hp-toolbox crashes because of some configuration problem
Summary: net-print/hplip-0.9.7 - hp-toolbox crashes because of some configuration problem
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-13 18:30 UTC by Dima Ryazanov
Modified: 2006-09-14 14:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2006-09-13 18:30:00 UTC
When I run hp-toolbox from net-print/hplip, I get the following:


 HP Linux Imaging and Printing System (ver. 0.9.7)
 HP Device Manager ver. 6.0

 Copyright (c) 2003-5 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.

Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 279, in ?
    sys.exit(main(sys.argv[1:]))
  File "/usr/bin/hp-toolbox", line 255, in main
    toolbox = devmgr4(toolboxCleanup)
  File "/usr/share/hplip/ui/devmgr4.py", line 535, in __init__
    self.cmd_print = config.get("commands", "print")
  File "/usr/lib/python2.4/ConfigParser.py", line 520, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'print' in section: 'commands'

The problem, apparently, is with the .hplip.conf file - if I remove it, hp-toolbox starts up fine. The contents of the file is:

[commands]
fax = hp-sendfax -d %FAX_URI% --standalone
scan = xsane -V %SANE_URI%
prnt = hp-print -p%PRINTER%
pcard = hp-unload -d %DEVICE_URI%
cpy =

[alerts]
email_address =
smtp_server =
email_alerts = False

[refresh]
rate = 30
enable = False

Looks like "prnt" is now "print", "cpy" is "copy", and so on.

But, I did not create that file, and didn't know about its existence until I read the .py scripts. So hp-toolbox should either start up anyway, or it should tell me that .hplip.conf is broken - but definitely not crash.

Also, the .desktop for hp-toolbox seems to be missing... (But that's a separate bug, I guess).


emerge --info:

Portage 2.1.1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.12.4
Last Sync: Thu, 14 Sep 2006 01:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.noved.org/"
LC_ALL="en_US.UTF-8"
LINGUAS="en uk ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow aac aalib acl acpi aim alsa apache2 asf audiofile bcmath bitmap-fonts browserplugin bzip2 cairo cdparanoia cli crypt css cups curl dbus dga directfb divx4linux dlloader dri dvd dvdr elibc_glibc emboss encode fam fbcon fbsplash ffmpeg flash foomaticdb gdbm gif glitz glut gpm gstreamer gtk gtk2 hal icq idn imlib input_devices_keyboard input_devices_mouse ipv6 isdnlog javascript jikes jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kernel_linux lcms lesstif libg++ libwww linguas_en linguas_ru linguas_uk live lm_sensors logitech-mouse mad mikmod mmx mng mp3 mpeg mplayer msn musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg openexr opengl oscar pam pcre pdf pic png povray ppds pppd qt3 qt4 quicktime rdesktop readline reflection rtc samba scanner sdl session sftplogging slp snmp speex spell spl sse ssl startup-notification subversion svg tcpd tetex theora tiff timidity truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_ati video_cards_radeon vorbis wifi win32codecs xcomposite xine xinerama xml xorg xscreensaver xv xvid yahoo zeroconf zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Dima Ryazanov 2006-09-14 00:23:15 UTC
Hm, nevermind the .desktop complaint - the .desktop file is present in hplip 1.6.7.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-09-14 01:17:59 UTC
Try with 1.6.7? 
Comment 3 Dima Ryazanov 2006-09-14 13:58:20 UTC
Ok, I think what happened is:
I had hplip 1.6.7 installed, and it created the conf file. Then, I reinstalled my system, and installed an older hplip, which didn't understand the new file. So hplip 1.6.7 works with that file, of course.

But, the crashing problem still occurs if I add an invalid line like "foo" - which, in my opinion, is still a bug. Especially if you start hp-toolbox from the K menu - it doesn't start, and there's no feedback at all.

Other programs deal with config problems more gracefully. For example, KWrite will print an error:
Invalid entry (missing '=') at /home/dima/.kde3.5/share/config/kwriterc:4
but it will still run.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-09-14 14:02:44 UTC
Graceful fallback needs to be requested upstream, apparently is works w/ valid config file.