Am I the only one getting this?
Code:
dugan@slackbookpro ~> /usr/bin/hp-upgrade
Traceback (most recent call last):
File "/usr/bin/hp-upgrade", line 34, in <module>
from base import utils, tui, module, os_utils, services, validation
File "/usr/share/hplip/base/module.py", line 30, in <module>
from . import tui, utils, device
File "/usr/share/hplip/base/device.py", line 42, in <module>
from . import status
File "/usr/share/hplip/base/status.py", line 33, in <module>
import cupsext
ImportError: No module named cupsext
It looks to me like -current's hplip package mixes Python 2 and 3 code in a way that doesn't work.
The entry point is a Python 2 file.
Code:
dugan@slackbookpro ~> ls -l /usr/bin/hp-upgrade
lrwxrwxrwx 1 root root 25 Nov 27 15:44 /usr/bin/hp-upgrade -> ../share/hplip/upgrade.py*
Its shebang is:
Which means it's executed with the Python 2 interpreter.
This series of imports eventually leads to the package's
status.py being imported. This is a Python 3 file, and its shebang is:
That file tries to import
cupsext, which the hplip package only ships for Python 3:
Code:
dugan@slackbookpro ~> grep cupsext /var/log/packages/*
/var/log/packages/hplip-3.17.11-x86_64-1:usr/lib64/python3.6/site-packages/cupsext.la
/var/log/packages/hplip-3.17.11-x86_64-1:usr/lib64/python3.6/site-packages/cupsext.so
However, it can't find these files because it's running in the Python 2 interpreter, and crashes.
Is there something wrong with my installation, or is this a bug with either hplip or Slackware?