Bug 243273 - hplip without hplip-gui doesn't work by default
hplip without hplip-gui doesn't work by default
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: hplip (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks: F7Update
  Show dependency treegraph
 
Reported: 2007-06-08 07:22 EDT by Steven Bakker
Modified: 2008-01-10 05:44 EST (History)
4 users (show)

See Also:
Fixed In Version: 1.7.2-13.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-26 23:52:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch to fallback to interactive mode (613 bytes, patch)
2007-06-08 16:35 EDT, Bernard Johnson
no flags Details | Diff
log of steps I took to try new hplip from updates-testing (4.42 KB, text/plain)
2007-06-12 23:20 EDT, Rodney Brown
no flags Details

  None (edit)
Description Steven Bakker 2007-06-08 07:22:49 EDT
Description of problem:

The hplip and hplip-gui packages have been split, but hplip utilities such as
"hp-setup" cannot be run without an explicit "-i" flag. The default for these
utilities is to run in GUI mode, which fails if hplip-gui is not installed, and
the utilities do not fall back to text mode instead.

Version-Release number of selected component (if applicable):

hplip-1.7.2-10.fc7

How reproducible:

Always

Steps to Reproduce:
1. Make sure hplip is installed, but not hplip-gui.
2. Run hp-setup from the command line.
  
Actual results:

Program dies with the following error message:
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.

Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 238, in <module>
    from ui import setupform
ImportError: No module named ui

Expected results:

Programs should say something like:

    GUI not available, selecting interactive mode.

Additionally, a desktop installation of Fedora that includes the printing system
should also install hplip-gui by default.

Additional info:

See also this thread on FedoraForum:

   http://forums.fedoraforum.org/forum/showthread.php?t=157085
Comment 1 Bernard Johnson 2007-06-08 16:35:34 EDT
Created attachment 156611 [details]
patch to fallback to interactive mode

Tim,

Please use this instead of moving the hp-setup program into the gui package. 
Moving hp-setup to the gui package will leave no text mode setup for printers
(without installing gui components).  That patch lets hp-setup attempt to run
in gui mode and then falls back to interactive (text mode) if it can't import
key gui components to run.
Comment 2 Steven Bakker 2007-06-09 19:37:24 EDT
Note that hp-setup is not the only utility in the set that requires the GUI
components.
Comment 3 Tim Waugh 2007-06-10 05:31:32 EDT
Bernard: thanks for the patch, I'll take a look.
Steven: please detail the others.
Comment 4 Steven Bakker 2007-06-10 06:13:23 EDT
Hi Tim,

Yes, I realise my comment was less than helpful ;-)

Anyway, a quick grep on "from ui" reveals:

  hp-fab
  hp-makecopies
  hp-sendfax
  hp-setup
  hp-unload

An uninstall of hplip-gui confirms this. Others (such as hp-align) work fine
withouth GUI components.

In addition, I'm getting an error on "hp-check":
---
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 37, in <module>
    from installer import dcheck, distros
ImportError: No module named installer
---

This is not related to hplip-gui (I get the error whether or not I have
hplip-gui installed). At first glance, it seems that "installer" is part of the
(original) hplip installer. Not sure whether it makes sense to include it in the
hplip package, or remove hp-check from the hplip RPM.

Cheers,
Steven
Comment 5 Rodney Brown 2007-06-10 08:38:14 EDT
On my fedora 7 system, hp-setup was also missing a dependency - PyQt.  After
installing PyQt I got the error about missing ui.
Comment 6 Rodney Brown 2007-06-10 08:40:18 EDT
Here is the error I was getting about PyQT:

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.

error: PyQt not installed. GUI not available. Exiting.
error: PyQt init failed. Reverting to interactive mode.
error: No devices found.
error: Error occured during interactive mode. Exiting.
Comment 7 Fedora Update System 2007-06-11 18:04:32 EDT
hplip-1.7.2-13.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Dennis Eckhaus 2007-06-12 00:02:28 EDT
Isn't the latest 1.7.4.1?  I was just checking out how my Deskjet 4160 might get
along with Fedora 7 when I try Fedora for the first time, probably tomorrow. 
I've been installing hplip on OpenSuSE 10.2 by installing the latest from
sourceforge since the 1.7.1 from Suser-Guru and the even older default one from
OpenSuSE make my print jobs christmas tree.  So I need to turn the printer off
and on and use Kprintjob to restart a job each time.  The newer versions fixed
that, and also gave me the nice GUI with the printer levels and controls.

Why wouldn't Fedora push the newer version?  No matter, since I tried the Fedora
7 KDE Live cd and the printer worked fine but I would like the nice
hp-device-manager (formally hp-toolbox) to work with the GUI.
Comment 9 Tim Waugh 2007-06-12 05:18:50 EDT
Dennis: I plan a newer version for Fedora, but I'd like to fix this bug first
before upgrading to a new version.
Comment 10 Dennis Eckhaus 2007-06-12 11:32:50 EDT
Ah!  I see.  Thanks for the info.  I'm going to try not to mess around with too
many manual installs of 3rd party things like hplip when using Fedora.  I only
do this with SuSE because it was the only way to get the printer to work
properly.  Nothing later than the buggy (on my printer) hplip 1.7.1 is available
for SuSE as of yet except for the latest from the hplip Sourceforge website. 
Hopefully I can just stick to what's on the Fedora repo (well, and Livna and
Dribble) and all my stuff will run okay.

Seems that I'm going to my other computer and installing Fedora just in time. 
My hard drive has started clicking and I can't afford a new one until next month!

Also, since updating to the new NVidia driver here I can't log out of KDE.  It
leaves my mouse and wallpaper showing and I can't do anything except hit the
reset button on my case.  I can't even do an init 3 from a terminal without
getting the same result!  Something's busted.  Looks like a new install with a
new hard drive is in the future.  Meanwhile I'll switch to the other computer
and try Fedora.

Funny, everything except the hard drive clicking works perfect while logged on.
 Only trying to log out, restart, shutdown, or exit in any way from the GUI
doesn't work.  Compcomm, gaming, videos, software all works perfectly.

Not a problem for you to deal with of course, but that's my story.
Comment 11 Tim Waugh 2007-06-12 11:42:57 EDT
Steven/Rodney: have either of you had a chance to try out the test update?
Comment 12 Dennis Eckhaus 2007-06-12 14:20:51 EDT
Oooh, I fixed my logout problem by changing Grub menu.lst from vga=0x317 to
vga=791.  Yeah, should be the same thing but now I can switch from the GUI to
the terminal without a problem.

Okay, I'll get out of here with my unrelated stuff now.  Sorry, but I like to
brag when I fix something.

Thanks for the attention and I hope not to have too many problems to come here
with on Fedora 7.
Comment 13 Steven Bakker 2007-06-12 15:48:45 EDT
Tim,

Haven't tried it yet. Hope to do so within the next 24 hours.

Thanks,
Steven
Comment 14 Rodney Brown 2007-06-12 23:14:20 EDT
Tim,

I uninstalled hplip-gui and then installed hplip from updates-testing and now I
get an additional error stating that hplip-gui is not installed:

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.

error: hplip-gui not installed.  GUI not available. Exiting.
error: PyQt init failed. Reverting to interactive mode.
error: No devices found.
error: Error occured during interactive mode. Exiting.
Comment 15 Rodney Brown 2007-06-12 23:20:27 EDT
Created attachment 156843 [details]
log of steps I took to try new hplip from updates-testing
Comment 16 Bernard Johnson 2007-06-12 23:41:40 EDT
(In reply to comment #14)
> error: hplip-gui not installed.  GUI not available. Exiting.
> error: PyQt init failed. Reverting to interactive mode.
> error: No devices found.
> error: Error occured during interactive mode. Exiting.

The root of the problem is that it didn't find any devices.  Can you supply more
information to hp-setup?

For example, in my case, I have to give the IP address of the printer:

hp-setup 192.168.1.11

See 'hp-setup -h' for more information.


Comment 17 Bernard Johnson 2007-06-12 23:43:57 EDT
(In reply to comment #14)
> error: hplip-gui not installed.  GUI not available. Exiting.

Tim, this should probably not say "Exiting" as it's not.

Comment 18 Tim Waugh 2007-06-13 03:57:34 EDT
(In reply to comment #17)
> (In reply to comment #14)
> > error: hplip-gui not installed.  GUI not available. Exiting.
> 
> Tim, this should probably not say "Exiting" as it's not.

I agree, but wanted to have consistent wording with the PyQt error message.
Comment 19 Rodney Brown 2007-06-13 06:20:14 EDT
(In reply to comment #16)

> The root of the problem is that it didn't find any devices.  Can you supply more
> information to hp-setup?
> 
> For example, in my case, I have to give the IP address of the printer:
> 
Ah, I was expecting it to ask a series of questions, etc.. like was it a usb or
network printer, etc... It works when I give it the ip address of the printer:

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.

error: hplip-gui not installed.  GUI not available. Exiting.
error: PyQt init failed. Reverting to interactive mode.

Setting up device: hp:/net/Officejet_6300_series?ip=192.168.0.150

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

warning: One or more print queues already exist for this device: Officejet_6300.

Would you like to install another print queue for this device? (y=yes, n=no*,
q=quit) ?
Comment 20 Tim Waugh 2007-06-13 06:27:20 EDT
I think that is a separate bug then, needing a separate bug report.  The
hplip-gui package split is something we need to check for in Fedora that isn't
really an issue upstream, but if there is some other issue with finding devices
then it seems like that would be an upstream issue.
Comment 21 Steven Bakker 2007-06-13 11:51:19 EDT
Hi Tim,

Had a look at the new package. The utilities I reported earlier (hp-fab,
hp-makecopies, hp-sendfax, hp-setup, hp-unload) now work without a GUI. They all
give the following error before switching to text mode:

   error: hplip-gui not installed.  GUI not available. Exiting.

Note that only hp-setup gives an additional:

   error: PyQt init failed. Reverting to interactive mode.

Also note that "interactive mode is really a misnomer, since a GUI is nothing if
not interactive :-)

Anyway, as far as I'm concerned it's fixed. Thanks!

Cheers,
Steven
Comment 22 Bernard Johnson 2007-06-14 12:13:11 EDT
(In reply to comment #20)
> I think that is a separate bug then, needing a separate bug report.  The
> hplip-gui package split is something we need to check for in Fedora that isn't
> really an issue upstream, but if there is some other issue with finding devices
> then it seems like that would be an upstream issue.

'hp-setup -h' gives:
"If no serial number, USB ID, IP, or device node is specified, the USB and
parallel busses will be probed for devices."

So not probing the 'net' bus by default seems to be "as designed".

Note: you could just as well use '-bnet' and tell it to probe the 'net' bus
instead of giving an ip addr.
Comment 23 Bernard Johnson 2007-06-14 12:18:32 EDT
(In reply to comment #22)
> Note: you could just as well use '-bnet' and tell it to probe the 'net' bus
> instead of giving an ip addr.

I mean you should be able to, but bug #214058 is a problem with that.
Comment 24 Fedora Update System 2007-06-26 23:52:19 EDT
hplip-1.7.2-13.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 25 Russell Odom 2008-01-10 05:00:41 EST
I'm also seeing the error noted in comment 4 for hp-check...

[root@detritus ~]# hp-check
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 37, in <module>
    from installer import dcheck
ImportError: No module named installer
[root@detritus ~]# rpm -qf `which hp-check`
hplip-gui-2.7.7-6.fc8.x86_64

Shall I file a separate bug? A patch is mentioned in bug 222639 comment 2 but I
don't know if that's related (I can't find any other reference to it).
Comment 26 Tim Waugh 2008-01-10 05:09:00 EST
Yes, please file a separate bug report.
Comment 27 Russell Odom 2008-01-10 05:44:05 EST
Bug 428246 filed for that.

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