You are not logged in.

#1 2019-11-08 01:19:28

ectospasm
Member
Registered: 2015-08-28
Posts: 40

hplip, PyQt4, and sip

I discovered a problem with hp-setup in hplip 3.19.11-1 (which is in the "extra" official repository).  For whatever reason, hp-setup could neither detect the correct PPD file for my HP MFP printer (Officejet 6500 e709n), nor would it accept the correct PPD file when I supplied it manually (either via the GUI or the TUI/CLI interactive mode).  So I resorted to using hp-doctor and hp-check to help diagnose the issue.

These failed as well, and it was quite obvious that they needed the python-pyqt4 package (from the AUR).  After overcoming the compilation problems for PyQt4, I was able to get it installed.  Miraculously, that's what was needed for hp-setup as well.  When I tried hp-setup again, it selected the correct PPD file automatically, and I was able to set up my printer without any further issues.

However, hp-doctor and hp-check still fail, with the same Python traceback (which is now different than the original failure which prompted me to install PyQt4):

Traceback (most recent call last):
  File "/usr/bin/hp-doctor", line 297, in <module>
    num_errors, num_warns = dep.validate(DEPENDENCY_RUN_AND_COMPILE_TIME, False)
  File "/usr/share/hplip/check.py", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/share/hplip/check.py", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 303, in get_pyQt4_version
    from PyQt4 import QtCore
RuntimeError: the sip module implements API v12.0 to v12.6 but the PyQt4.QtCore module requires API v12.7

It appears sip-4.19.19 (which is also in the "extra" repository) only implements API versions v12.0-v12.6, and the new PyQt4 version I installed requires version v12.7.  I tried installing sip-5.0.0 via Python pip (as I saw upstream that 4.19.19 is the latest "old" version), but when recompiling PyQt4 it says it cannot be built with sip version v5 or later.

I didn't know where to post this, so I posted this here.  hp-doctor and hp-check are still broken, but hp-setup looks like it completed successfully.  I still have yet to see if my MFP printer/scanner works yet.  The main thing is that it appears hplip depends on PyQt4, but that is only available in the AUR.  The "community" python-qtpy package doesn't appear to cut it.

EDIT:  My immediate purpose (getting the scanner to work with simple-scan) was successful, simple-scan recognized my Officejet as a scanner, and I was able to scan in an important receipt for an insurance claim.

The issues with hp-doctor and hp-check still exist, however.  Guidance on where the proper place to report this would be much appreciated.  I've already mentioned it in the hplip upstream bug tracker, but I realize this may be a more Arch-specific problem.

Last edited by ectospasm (2019-11-08 03:53:32)

Offline

#2 2019-11-08 07:22:05

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 1,642

Re: hplip, PyQt4, and sip

How was it "quite obvious" that they needed the package python-pyqt4? Please post the literal error message you got before installing pyqt4

Offline

#3 2019-11-12 23:18:51

ectospasm
Member
Registered: 2015-08-28
Posts: 40

Re: hplip, PyQt4, and sip

arojas wrote:

How was it "quite obvious" that they needed the package python-pyqt4? Please post the literal error message you got before installing pyqt4

I didn't record the exact error message, so I cannot provide it here.  My terminal scrollback buffer only has 30,000 lines in it, and the earliest messages indicate I was in the middle of a Qt4 compilation when the error message scrolled off.

Whatever it was clued me in that hp-setup was built using Qt4, and I could see it was built using Python (it was a standard traceback message).  Like I said, it was obvious to me.  I have no other way to explain it, and now on the target system I'm not likely to encounter the same error because I installed PyQt4.  My other Arch systems are headless, so no GUI.  It is not clear that the interactive (TUI/CLI) mode of hp-setup will show me the same error. 

I'll see if I can reproduce the error, and post it here.  But don't get your hopes up.

Offline

#4 Yesterday 15:54:32

ectospasm
Member
Registered: 2015-08-28
Posts: 40

Re: hplip, PyQt4, and sip

Trying to run it on one of my headless Arch systems, using X11 forwarding.  I get the following output:

hp-setup                                                                                                                  ─(2019-11-13)─┘

HP Linux Imaging and Printing System (ver. 3.19.11)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP 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.

warning: GUI Modules PyQt4 and PyQt5 are not installed
error: hp-setup requires GUI support (try running with --qt3). Also, try using interactive (-i) mode.

That warning looks pretty obvious.  I thought it was a traceback after the GUI showed, and wouldn't use the correct PPD file.  It doesn't look like I can actually reproduce the error that I saw, but that warning should be enough.

Offline

#5 Yesterday 16:13:43

teckk
Member
Registered: 2013-02-21
Posts: 320

Re: hplip, PyQt4, and sip

I'm not up to date.

Name            : hplip
Version         : 1:3.19.8-1
Description     : Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and
                  some LaserJet
Architecture    : x86_64
URL             : https://hplipopensource.com
Licenses        : GPL2  custom
Groups          : None
Provides        : None
Depends On      : python-dbus  ghostscript  net-snmp  foomatic-db-engine
                  python-gobject
Optional Deps   : cups: for printing support
                  sane: for scanner support
                  xsane: sane scanner frontend
                  python-pillow: for commandline scanning support
                  python-reportlab: for pdf output in hp-scan
                  rpcbind: for network support
                  python-pyqt5: for running GUI and hp-toolbox
                  libusb: for advanced usb support
                  wget: for network support
...

Says that there is an optional depend on python-pyqt5 for GUI

tried installing sip-5.0.0 via Python pip

Keep using pip to install python modules and you'll have a mess. If there is something that's not in the repo, or AUR, make a PKGBUILD for it, build a package, and install it with pacman.

What do you get with:

pacman -Syu hplip

Do you still get errors? If so post them.

Last edited by teckk (Yesterday 16:14:24)

Offline

#6 Today 02:01:23

merlock
Member
Registered: 2018-10-30
Posts: 26

Re: hplip, PyQt4, and sip

I don't have PyQt4 installed...hp-{setup,doctor,check} all work fine for me. (No GUI wanted/needed)


It's a big club...and you ain't in it -- George Carlin

perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

Board footer

Powered by FluxBB