hpkip 3.20.9 fails to launch

Asked by smurf on 2020-10-24

I installed hp 3.20.9 in a fresh install of Ubuntu Mate 20.04.1 , installer works fine and gives no errors.
But the main window doesn't appear, so I launched from terminal and this is the problem:

luca@laptop-luca:~/sistema$ hp-systray -x

HP Linux Imaging and Printing System (ver. 3.20.9)
System Tray Status Service ver. 2.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.

HP Linux Imaging and Printing System (ver. 3.20.9)
HPLIP upgrade latest version ver. 1.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.

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/bin/hp-upgrade", line 292, in <module>
    core = CoreInstall(MODE_CHECK)
  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 122, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 677, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 737, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 899, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 552, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1012, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, 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_upgrade.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/bin/hp-upgrade", line 292, in <module>
    core = CoreInstall(MODE_CHECK)
  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 122, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 677, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 737, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 899, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 552, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1012, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

How to fix that problem?

Question information

Language:
English Edit question
Status:
Expired
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
2020-11-08
Last reply:
2020-11-23

This question was reopened

shivani mandora (shivani1708) said : #1

Hi ,

Can you launch hplip using $hp-setup.

Let me know if you have any issues for the same.

smurf (luca-dgh) said : #2

Yes I've done it, it worked until reboot.
After reboot no way to see the main window, furthermore I can't download and install the required plugin because the same error.

shivani mandora (shivani1708) said : #3

Instead of doing $hp-plugin , please install plugin using $sh hplip-3.20.9.plugin.run
Let me know if you face any issue after that.

smurf (luca-dgh) said : #4

Hi Shivani, thanks for your help.
Can you please tell me how to download the plugin.run file?
in this link https://developers.hp.com/hp-linux-imaging-and-printing/plugins I can find the plugins, but there is no option to download, I can only see the source code. I tried to copy and paste the souce code in a local file, but it doesn't work because the MD5 sum doesn't match.

Manfred Hampl (m-hampl) said : #5

Visit https://developers.hp.com/hp-linux-imaging-and-printing/plugins with your web browser, do a right click on the "hplip-3.20.9-plugin.run" link and select "save target as" (or similar, wording depends on browser) to save a copy on your disk.

or us the command
wget https://developers.hp.com/sites/default/files/hplip-3.20.9-plugin.run

smurf (luca-dgh) said : #6

luca@laptop-luca:~$ bash hplip-3.20.9-plugin.run
Verifying archive integrity... All good.
Uncompressing HPLIP 3.20.9 Plugin Self Extracting Archive..............................................................

HP Linux Imaging and Printing System (ver. 3.20.9)
Plugin Installer ver. 3.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.

Plug-in version: 3.20.9
Installed HPLIP version: 3.20.9
Number of files to install: 64

note: Using PyQt5
error: Unable to load Qt5 support. Is it installed? Try running with -i or --qt3 instead.
luca@laptop-luca:~$ bash hplip-3.20.9-plugin.run -i
Unrecognized flag : -i
Makeself version 2.1.5
 1) Getting help or info about hplip-3.20.9-plugin.run :
  hplip-3.20.9-plugin.run --help Print this message
  hplip-3.20.9-plugin.run --info Print embedded info : title, default target directory, embedded script ...
  hplip-3.20.9-plugin.run --lsm Print embedded lsm entry (or no LSM)
  hplip-3.20.9-plugin.run --list Print the list of files in the archive
  hplip-3.20.9-plugin.run --check Checks integrity of the archive

 2) Running hplip-3.20.9-plugin.run :
  hplip-3.20.9-plugin.run [options] [--] [additional arguments to embedded script]
  with following options (in that order)
  --confirm Ask before running embedded script
  --noexec Do not run embedded script
  --keep Do not erase target directory after running
   the embedded script
  --nox11 Do not spawn an xterm
  --nochown Do not give the extracted files to the current user
  --target NewDirectory Extract in NewDirectory
  --tar arg1 [arg2 ...] Access the contents of the archive through the tar command
  -- Following arguments will be passed to the embedded script
luca@laptop-luca:~$ bash hplip-3.20.9-plugin.run --qt3
Unrecognized flag : --qt3
Makeself version 2.1.5
 1) Getting help or info about hplip-3.20.9-plugin.run :
  hplip-3.20.9-plugin.run --help Print this message
  hplip-3.20.9-plugin.run --info Print embedded info : title, default target directory, embedded script ...
  hplip-3.20.9-plugin.run --lsm Print embedded lsm entry (or no LSM)
  hplip-3.20.9-plugin.run --list Print the list of files in the archive
  hplip-3.20.9-plugin.run --check Checks integrity of the archive

 2) Running hplip-3.20.9-plugin.run :
  hplip-3.20.9-plugin.run [options] [--] [additional arguments to embedded script]
  with following options (in that order)
  --confirm Ask before running embedded script
  --noexec Do not run embedded script
  --keep Do not erase target directory after running
   the embedded script
  --nox11 Do not spawn an xterm
  --nochown Do not give the extracted files to the current user
  --target NewDirectory Extract in NewDirectory
  --tar arg1 [arg2 ...] Access the contents of the archive through the tar command
  -- Following arguments will be passed to the embedded script
luca@laptop-luca:~$

And qt5 is installed on my system, if needed I'll post the output of apt list, but it's about 300 lines long.

Manfred Hampl (m-hampl) said : #7

Try
./hplip-3.20.9-plugin.run -- -i

smurf (luca-dgh) said : #8

ok, with Manfred suggestion I installed the plugin (that syntax is quite unusual...).
But now the hp-systray has another problem:

luca@laptop-luca:~$ hp-systray

HP Linux Imaging and Printing System (ver. 3.20.9)
System Tray Status Service ver. 2.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-systray requires Qt4 GUI and DBus support. Exiting.
luca@laptop-luca:~$

which packages are missed?

smurf (luca-dgh) said : #9

ok I found the package missing, but now we are back to the first error.
I omit the output because is quite long and is exactly the same posted in the original post.

smurf (luca-dgh) said : #10

No more ideas?

Manfred Hampl (m-hampl) said : #11

You have to be aware that here are certain incompatibilities between HPLIP and Ubuntu 20.04.
If you do not have success with the packages downloaded from the HPLIP pages, then you should revert to the version in the Ubuntu repositories (for Ubuntu 20.04 there is an adapted version of hplip 3.20.3)

smurf (luca-dgh) said : #12

Nor version 3.20.3 is working properly, the icon stuck with a grey square and a red crossed circle and the main window is not working.
In the next days I'll reinstall that version and I'll try to understand if the error is the same of 3.20.9.

smurf (luca-dgh) said : #13

@Manfred Hampl

uninstalled hplip 3.20.9 and installed 3.20.3 from ubuntu repository.

luca@laptop-luca:~$ hp-systray
error: Unable to locate models.dat file

HP Linux Imaging and Printing System (ver. 0.0.0)
System Tray Status Service ver. 2.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 mode disabled in build.
error: hp-systray requires Qt4 GUI and DBus support. Exiting.
luca@laptop-luca:~$

QT4 GUI I don't know which package is.

models .dat is installed

luca@laptop-luca:~$ sudo find / -name models.dat
/home/luca/sistema/hplip-3.20.9/data/models/models.dat
find: ‘/run/user/1000/gvfs’: Permiso denegado
/usr/share/hplip/data/models/models.dat
luca@laptop-luca:~$

smurf (luca-dgh) said : #14

Please, any idea to fix this? I wish to get a working hplip on my laptop, because I have 2 hp printers and need to manage them.

Launchpad Janitor (janitor) said : #15

This question was expired because it remained in the 'Open' state without activity for the last 15 days.