hp-plugin fails for ScanJet Pro 2000 s2

Asked by Lukas

Hi all, I'm currently using Kubuntu 21.04.

I'm trying to setup my ScanJet Pro 2000 s2 (connected via usb) and installed hplip-3.21.8.run according to the instructions here: https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index

The installation works fine until it tries to setup the scanner itself in Step 13. After replugging the USB-cable, it gets detected without problems. Then, both options of the driver plugin-installer fail though:
- When trying to download the plug-in from the HP server, following error is thrown in the terminal:

Checking for network connection...
Downloading plug-in from:
Traceback (most recent call last):
  File "/usr/share/hplip/base/password.py", line 85, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/ui5/plugindialog.py", line 248, in NextButton_clicked
    status, download_plugin_file, error_str = self.pluginObj.download(self.plugin_path,self.plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 257, in download
    core = core_install.CoreInstall()
  File "/usr/share/hplip/installer/core_install.py", line 241, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 118, in __init__
    self.__readAuthType() # self.__authType
  File "/usr/share/hplip/base/password.py", line 141, in __readAuthType
    distro_name = get_distro_name().lower().replace(" ","")
  File "/usr/share/hplip/base/password.py", line 88, in get_distro_name
    os_name = distro.linux_distribution()[0]
  File "/usr/lib/python3/dist-packages/distro.py", line 125, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 681, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 741, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 903, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 556, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1014, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
PermissionError: [Errno 13] Permission denied: '/var/crash/_usr_share_hplip_plugin.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/hplip/base/password.py", line 85, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/ui5/plugindialog.py", line 248, in NextButton_clicked
    status, download_plugin_file, error_str = self.pluginObj.download(self.plugin_path,self.plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 257, in download
    core = core_install.CoreInstall()
  File "/usr/share/hplip/installer/core_install.py", line 241, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 118, in __init__
    self.__readAuthType() # self.__authType
  File "/usr/share/hplip/base/password.py", line 141, in __readAuthType
    distro_name = get_distro_name().lower().replace(" ","")
  File "/usr/share/hplip/base/password.py", line 88, in get_distro_name
    os_name = distro.linux_distribution()[0]
  File "/usr/lib/python3/dist-packages/distro.py", line 125, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 681, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 741, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 903, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 556, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1014, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

When selecting the option to install a local copy of the file (what I don't have anyways I think), the following error is thrown:

kf.kio.core: KIO Connection server not listening, could not connect
kf.kio.core: couldn't create slave: "Can not create socket for launching io-slave for protocol 'tags'."
kf.kio.core: "Unable to create io-slave. Can not create socket for launching io-slave for protocol 'tags'."
kf.kio.core: KIO Connection server not listening, could not connect
kf.kio.core: couldn't create slave: "Can not create socket for launching io-slave for protocol 'file'."
kf.kio.core: KIO Connection server not listening, could not connect
kf.kio.core: couldn't create slave: "Can not create socket for launching io-slave for protocol 'file'."
kf.config.core: Couldn't write "/home/lukas/.config/kdeglobals" . Disk full?
kf.config.core: Couldn't write "/home/lukas/.config/hp-pluginrc" . Disk full?

The disk is definitely not full with ~1.5TB unused space.
Running hp-plugin yields the same result.
Connecting to the scanner via xSane or skanlite afterwards fails with an Error during device I/O.

Any help is appreciated, thanks in advance.

Question information

Language:
English Edit question
Status:
Open
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Lukas (lukasw-24) said :
#1

After a short search through the stacktrace: It seems that platform.dist has been deprecated since python version 3.5 and removed in version 3.8 together with platform.linux_distribution - locally I'm running version 3.9, so that seems to be the cause for the failing automatic download.
It seems the distro package is the currently recommended alternative, see
https://docs.python.org/3.6/library/platform.html#platform.dist and
https://pypi.org/project/distro/

Any chance that this will be picked up in a future release or would I need to downgrade my local python version?

Can you help with this problem?

Provide an answer of your own, or ask Lukas for more information if necessary.

To post a message you must log in.