HP-SETUP failures in Rome

Hello,

Requirements:

  • I searched the forum, the only HP-SETUP issue I found was unrelated from last January.
  • Checked resources - didn’t see relevant issue.
  • No match from the Wiki
  • Nothing in the Errata for Rome regarding HP-SETUP

I have Searched the forum for my issue and found nothing related or helpful
I have checked the Resources category (Resources Index)
I have reviewed the Wiki for relevant information
I have read the the Release

Notes and Errata

OpenMandriva Lx version:

OpenMandriva Lx release 26.02 (ROME) Rolling for znver1

Desktop environment (KDE, LXQT…):

Plasma 6

Description of the issue (screenshots if relevant):

hp-setup -i 192.168.1.***
/usr/bin/hp-setup:82: SyntaxWarning: “*” is an invalid escape sequence. Such sequences will not work in the future. Did you mean “\"? A raw string is also an option.
(“To specify the port on a multi-port JetDirect:”, “–port= (Valid values are 1*, 2, and 3. *default)”, “option”, False),
/usr/bin/hp-setup:86: SyntaxWarning: “*” is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\
”? A raw string is also an option.
(“Type of queue(s) to install:”, “-t or --type=. : print*, fax* (*default) (-i mode only)”, “option”, False),
Traceback (most recent call last):
File “/usr/bin/hp-setup”, line 48, in
from base import device, utils, tui, models, module, services, os_utils
File “/usr/share/hplip/base/device.py”, line 2691, in
class LocalOpener(urllib_request.URLopener):
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module ‘urllib.request’ has no attribute ‘URLopener’

Relevant informations (hardware involved, software version, logs or output…):

I searched via this forum and others, found a similar issue on Arch. Python 3.14 deprecated the way HP is using this function. They had to implement a patch to get it working.

Potential work around.

  1. Install pyenv curl -fsSL https://pyenv.run | bash
    1. Requires git - sudo dnf in git
  2. Initialize your environment
    1. Restart shell, or init shell.
  3. test pyenv works pyenv –version
  4. create a working directory, mkdir test
    1. enter that directory cd test
  5. install working python version; pyenv install 3.11.14
    1. This will require all the build tools; sudo dnf in gcc glibc-devel glibc-utils make patch python-pip python-virtualenv zlib-devel lib64ffi-devel lib64readline-devel lib64openssl-devel lib64edit-devel
  6. Got stuck here tonight - pyenv is only showing the system version no matter what commands I type in attempt to alter that.

I got this working this morning - not sure what changed but global python version is now reporting 3.11.14.

This also doesn’t work;
ModuleNotFoundError: No module named 'cupsext'

According to the HP website:

Please ensure to run HPLIP tools using the same version of Python which was used for HPLIP installation or re-install HPLIP from https://developers.hp.com/hp-linux-imaging-and-printing/gethplip

I have no idea what version of Python was used to compile the HP library in the OpenMandriva repo so I’m stuck here.

We upgraded to Python 3.14 in Cooker in December, HPLIP was rebuilt for Python 3.14 on the 19th of December following that Python upgrade and those upgraded/rebuilt packages have since been merged into ROME.

You can double-check which Python ABI that HPLIP is compiled using by using DNF (This output is from a ROME system):

$ dnf rq --requires hplip | grep "python(abi)"
Updating and loading repositories:
Repositories loaded.
python(abi) = 3.14

I will state that Python versions are not ABI compatible and downgrading your system’s Python version or setting a global version to an incompatible ABI in order to override the system version using tools like pyenv is an unsupported use case and will cause a lot of problems with system python packages which are compiled using Python 3.14.

1 Like

Got it - so I’ll have to wait for the patch to get around the urllib.request error.

I tried installing the printer via the gui tool in the welcome app, and that appeared to not work. Checked in the Plasma settings screen and it sees the printer. :person_shrugging:

Just checked and it printed a test page. I’m willing to mark this resolved for the moment.

I have mentioned this thread in the cooker room to @AngryPenguin with a potential fix from upstream, as I am not familiar with that package nor do I have a printer it supports in order to test any fixes with I cant offer further solutions.

I also opened a bug up on GitHub for this:

I’m not running cooker, but if no one else is able, I can try to test the fix.