Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203546 - net-print/hplip-2.7.12: hp-toolbox crashes when trying to import fax
Summary: net-print/hplip-2.7.12: hp-toolbox crashes when trying to import fax
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Denis Dupeyron (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-28 06:57 UTC by Dima Ryazanov
Modified: 2008-08-17 12:57 UTC (History)
4 users (show)

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


Attachments
hp-check run as root (hp-check.log,10.47 KB, text/plain)
2008-02-06 18:11 UTC, Don Swam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2007-12-28 06:57:18 UTC
I just upgraded to hplip-2.7.12, tried running "hp-toolbox" to see if it still works, and got this:

HP Linux Imaging and Printing System (ver. 2.7.10)
HP Device Manager ver. 11.0

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.

Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 137, in ?
    from ui.devmgr4 import DevMgr4
  File "/usr/share/hplip/ui/devmgr4.py", line 48, in ?
    from scrollfax import ScrollFaxView
  File "/usr/share/hplip/ui/scrollfax.py", line 40, in ?
    from fax import fax
ImportError: cannot import name fax


I found some interesting lines in /usr/share/hplip/ui/scrollfax.py:

fax_enabled = False
#try:
if 1:
    from fax import fax
    fax_enabled = True
#except ImportError:
if 0:
    # This can fail on Python < 2.3 due to the datetime module
    # or if fax was diabled during the build
    log.warn("Fax send disabled - Python 2.3+ required.")


Reproducible: Always

Steps to Reproduce:
1. Run hp-toolbox

Actual Results:  
It crashes.
(Works fine if run as root, though...)

Expected Results:  
It should start.

emerge --info:

Portage 2.1.4_rc11 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 i686)
=================================================================
System uname: 2.6.23-gentoo-r3 i686 AMD Athlon(tm) XP 2000+
Timestamp of tree: Fri, 28 Dec 2007 05:30:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="x86"
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/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS=" http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ "
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa ao avi bitmap-fonts cairo cdr cli cracklib crypt cups dbus dlloader dri dv dvd dvdr dvdread emboss encode fam firefox fortran gdbm gif glut gpm gstreamer hal iconv imlib ipv6 isdnlog jpeg kde kdeenablefinal kdehiddenvisibility kdrive lm_sensors mad midi mikmod mmx mmxext mng mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg openexr opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime rdesktop readline reflection samba scanner sdl session slang spell spl sse ssl svg tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis wifi win32codecs x86 xcb xcomposite xine xinerama xml xorg xscreensaver xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en uk ru" USERLAND="GNU" VIDEO_CARDS="radeon ati"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Denis Dupeyron (RETIRED) gentoo-dev 2007-12-28 08:47:16 UTC
(In reply to comment #0)
> (Works fine if run as root, though...)

Is your user in the lp group ?

Denis.
Comment 2 Dima Ryazanov 2007-12-30 22:17:21 UTC
Yes.

(Though if I run hp-toolbox as a user who is not in lp, the result is the same.)
Comment 3 Don Swam 2008-01-06 15:24:33 UTC
(In reply to comment #2)
> Yes.
> 
> (Though if I run hp-toolbox as a user who is not in lp, the result is the
> same.)
> 

I have the same problem, but it does not work as root.
shuttle don # /usr/share/hplip/toolbox.py

HP Linux Imaging and Printing System (ver. 2.7.12)
HP Device Manager ver. 11.0

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.

Traceback (most recent call last):
  File "/usr/share/hplip/toolbox.py", line 137, in <module>
    from ui.devmgr4 import DevMgr4
  File "/usr/share/hplip/ui/devmgr4.py", line 48, in <module>
    from scrollfax import ScrollFaxView
  File "/usr/share/hplip/ui/scrollfax.py", line 40, in <module>
    from fax import fax
ImportError: Bad magic number in /usr/share/hplip/fax/__init__.p

shuttle don # emerge --info
Portage 2.1.4_rc14 (default-linux/amd64/2006.1/desktop, gcc-4.1.2, glibc-2.7-r1, 2.6.23-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.23-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3500+
Timestamp of tree: Fri, 04 Jan 2008 20:30:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.4.4-r4, 2.5.1-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/mozilla/defaults/pref /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo"
LANG="C"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa amd64 berkdb bitmap-fonts browserplugin cairo cdr cjk cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd fam ffmpeg firefox foomatic fortran gdbm gif gimp glitz gnome gphoto2 gpm gstreamer gtk gtk2 hal howl iconv ipv6 isdnlog java jpeg ldap lirc lm_sensors mad midi mikmod modplug mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin nvidia ogg oggvorbis openal opengl openmp oss pam pcre pdf perl png ppds pppd python qt qt3 qt4 quicktime readline reflection samba scanner sdl session sndfile spell spl ssl startup-notification tcpd truetype truetype-fonts type1-fonts unicode usb vorbis xml xorg xv zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 4 Don Swam 2008-01-07 18:09:59 UTC
(In reply to comment #3)
I re-emerged hplip using the fax use flag, and now it works.
Comment 5 Robin Bankhead 2008-01-19 12:54:03 UTC
(In reply to comment #4)
> (In reply to comment #3)
> I re-emerged hplip using the fax use flag, and now it works.
> 

Be that as it may, I do hope that this kink will be addressed in a future ebuild. There's no point in having a USE=fax if your device is non-fax-functional.

Somewhat off-topic, but there is a similar (though non-crashing) buglet whereby hp-check spits an error if you do not have CONFIG_PARPORT=y in your kernel, even when built with USE=-parport.
Comment 6 Denis Dupeyron (RETIRED) gentoo-dev 2008-02-05 09:08:28 UTC
Sorry for the delay, I just got back. Dima, Don and Robin, please attach the result of hp-check run as root (please, do not inline it, it would mess up the bug) and I'll have a look at this.

> Somewhat off-topic, but there is a similar (though non-crashing) buglet whereby
> hp-check spits an error if you do not have CONFIG_PARPORT=y in your kernel,
> even when built with USE=-parport.

Upstream has the bad habit of making things optional and flagging them as errors when disabled. Not very logical if you ask me. I could maybe patch this but as it looks like I'm the only one looking at hp-check results I never really bothered.

Denis.
Comment 7 Don Swam 2008-02-06 18:11:54 UTC
Created attachment 142838 [details]
hp-check run as root

The errors for the 8250 are ok, because it was not connected to 
the machine when hp-check was run.
Comment 8 Erlend Davidson 2008-03-16 18:15:14 UTC
Would an interim fix not be to get rid of the "fax" useflag (for this version) until it is fixed?
Comment 9 Denis Dupeyron (RETIRED) gentoo-dev 2008-08-17 12:57:11 UTC
Please test this again with either the stable 2.8.6b or unstable 2.8.7.

Thansk,
Denis.