Bug 243273 - hplip without hplip-gui doesn't work by default
Summary: hplip without hplip-gui doesn't work by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: F7Update
TreeView+ depends on / blocked
 
Reported: 2007-06-08 11:22 UTC by Steven Bakker
Modified: 2008-01-10 10:44 UTC (History)
4 users (show)

Fixed In Version: 1.7.2-13.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-27 03:52:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to fallback to interactive mode (613 bytes, patch)
2007-06-08 20:35 UTC, 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-13 03:20 UTC, Rodney Brown
no flags Details

Description Steven Bakker 2007-06-08 11:22:49 UTC
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 20:35:34 UTC
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 23:37:24 UTC
Note that hp-setup is not the only utility in the set that requires the GUI
components.


Comment 3 Tim Waugh 2007-06-10 09:31:32 UTC
Bernard: thanks for the patch, I'll take a look.
Steven: please detail the others.

Comment 4 Steven Bakker 2007-06-10 10:13:23 UTC
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 12:38:14 UTC
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 12:40:18 UTC
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 22:04:32 UTC
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 04:02:28 UTC
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 09:18:50 UTC
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 15:32:50 UTC
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 15:42:57 UTC
Steven/Rodney: have either of you had a chance to try out the test update?

Comment 12 Dennis Eckhaus 2007-06-12 18:20:51 UTC
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 19:48:45 UTC
Tim,

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

Thanks,
Steven

Comment 14 Rodney Brown 2007-06-13 03:14:20 UTC
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-13 03:20:27 UTC
Created attachment 156843 [details]
log of steps I took to try new hplip from updates-testing

Comment 16 Bernard Johnson 2007-06-13 03:41:40 UTC
(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-13 03:43:57 UTC
(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 07:57:34 UTC
(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 10:20:14 UTC
(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 10:27:20 UTC
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 15:51:19 UTC
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 16:13:11 UTC
(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 16:18:32 UTC
(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-27 03:52:19 UTC
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 10:00:41 UTC
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 10:09:00 UTC
Yes, please file a separate bug report.

Comment 27 Russell Odom 2008-01-10 10:44:05 UTC
Bug 428246 filed for that.


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