LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   hp-toolbox broken (https://www.linuxquestions.org/questions/slackware-14/hp-toolbox-broken-4175433101/)

hj1967 10-19-2012 02:07 PM

hp-toolbox broken
 
the hp-toolbox program (part of the hplip package) is broken since HP released the second update in October. (3.12.10a)

There is a version check and that fails because it can not handle 10a. It is not realy a
Slackware problem but the current version is broken now.

It fails with the following error:

Code:

\Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 257, in <module>
    toolbox = DevMgr5(__version__, device_uri,  None)
  File "/usr/share/hplip/ui4/devmgr5.py", line 204, in __init__
    if not utils.Is_HPLIP_older_version( installed_version,  self.user_settings.latest_available_version):
  File "/usr/share/hplip/base/utils.py", line 1927, in Is_HPLIP_older_version
    if(int(installed_array[cnt]) < int(available_array[cnt])):
ValueError: invalid literal for int() with base 10: "10a Public Release</a><br />')"

Should I build a new package from the latest source or is here a python hacker who can
tell me which lines I have to delete to disable the buggy version check.

Henk Jan

ReaperX7 10-19-2012 03:13 PM

You might want to check with HP and see if they have a more recent version of HPLIP. Grab Patrick's SlackBuild from the /source directory of your Source DVD or online, and use it and the updated (if it exists) HPLIP driver to create a new package.

hj1967 10-19-2012 04:40 PM

Quote:

Originally Posted by ReaperX7 (Post 4810208)
You might want to check with HP and see if they have a more recent version of HPLIP. Grab Patrick's SlackBuild from the /source directory of your Source DVD or online, and use it and the updated (if it exists) HPLIP driver to create a new package.

I have build a new package using the hplib-3.12.10a from the website and as hp-toolbox works again.

I have reported a bug about the version update. https://bugs.launchpad.net/hplip/+bug/1068867

titopoquito 10-19-2012 04:51 PM

I have only tested it in a python shell, am not a python hacker and take no responsibility for any damages :) That said, you could try:

Code:

if((installed_array.split()[0]) < (available_array.split()[0])):
This should regard "10" lower than "10a" and "10b" higher than "10a" and so on.

EDIT: Glad you sorted it out already :)

hgjanu 10-19-2012 11:31 PM

hplip - utils.py error
 
Quote:

Originally Posted by titopoquito (Post 4810280)
I have only tested it in a python shell, am not a python hacker and take no responsibility for any damages :) That said, you could try:

Code:

if((installed_array.split()[0]) < (available_array.split()[0])):
This should regard "10" lower than "10a" and "10b" higher than "10a" and so on.

EDIT: Glad you sorted it out already :)

I corrected the utils.py - and I got a new error:
Code:

 
File "/usr/share/hplip/base/utils.py", line 1937, in Is_HPLIP_older_version
    if((installed_array.split()[0]) < (available_array.split()[0])):
AttributeError: 'list' object has no attribute 'split'

What can I do?

hj1967 10-20-2012 03:24 AM

Quote:

Originally Posted by hgjanu (Post 4810468)
I corrected the utils.py - and I got a new error:
Code:

 
File "/usr/share/hplip/base/utils.py", line 1937, in Is_HPLIP_older_version
    if((installed_array.split()[0]) < (available_array.split()[0])):
AttributeError: 'list' object has no attribute 'split'

What can I do?

I think the best is to get the 'doinst.sh.gz slack-desc hplip.SlackBuild' from the slackware sources
and use the hplip-3.12.10a.tar.gz from the HPLIP website and then build the new package
and use upgradepkg to install the package.

The reply I got from the HPLIB people: This issue has been resolved in hplip 3.12.10a version

tronayne 10-20-2012 10:36 AM

Hey, thanks for this -- just did a clean install of Slackware 14.0 64-bit and, guess what, HPLIP wasn't working (hp-setup did, printing worked on an Ethernet and an USB printers but no joy with the little hp icon). I was about the go to the H-P website and see about the version, read your posts, ah-ha, got it, built it, installed it and life is good.

hj1967 10-20-2012 10:54 AM

Quote:

Originally Posted by tronayne (Post 4810768)
Hey, thanks for this -- just did a clean install of Slackware 14.0 64-bit and, guess what, HPLIP wasn't working (hp-setup did, printing worked on an Ethernet and an USB printers but no joy with the little hp icon). I was about the go to the H-P website and see about the version, read your posts, ah-ha, got it, built it, installed it and life is good.

Yes it a bug introduce by HP unfortunately and you need to upgrade the package. I don't think it is important enough to get an update package as a Slackware Patch
but rebuilding the package from the latest sources is easy.

hgjanu 10-20-2012 12:40 PM

The last package (3.12.10a) solved the problem. Thanks.

kikinovak 01-20-2013 08:41 AM

I've put an update for HPLIP 3.12.11 on my package repo.

Code:

Sun Jan 20 14:22:30 CET 2013
patches/hplip-3.12.11-i486-1_microlinux.txz: Upgraded.
patches/hplip-3.12.11-x86_64-1_microlinux.txz: Upgraded.
  Fix for broken 'hp-toolbox' utility.

Source:

http://www.microlinux.fr/slackware/1.../source/hplip/

Packages:

http://www.microlinux.fr/slackware/1...microlinux.txz
http://www.microlinux.fr/slackware/1...microlinux.txz

Enjoy,

Niki

kikinovak 01-20-2013 08:43 AM

Quote:

Originally Posted by hj1967 (Post 4810781)
Yes it a bug introduce by HP unfortunately and you need to upgrade the package. I don't think it is important enough to get an update package as a Slackware Patch
but rebuilding the package from the latest sources is easy.

I'd say 'hp-toolbox' being unable to start is a rather critical bug.


All times are GMT -5. The time now is 02:37 AM.