I tried to save locally "hplip-3.18.6-plugin.run" downloaded from the hp-developers website. If feeded into "hp-setup -ia", I get:
---------------
| COPY PLUGIN |
---------------
Downloading plug-in from: file:///mnt/mmcblk0p2/tce/foo2zjs/hplip-3.18.6-plugin.run
Downloading plug-in: [\ ] 0% Traceback (most recent call last):
File "/usr/local/bin/hp-plugin", line 363, in <module>
status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/pluginhandler.py", line 254, in download
core = core_install.CoreInstall()
File "/tmp/tcloop/hplip/usr/local/share/hplip/installer/core_install.py", line 231, in __init__
self.passwordObj = password.Password(ui_mode)
File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 112, in __init__
self.__readAuthType() # self.__authType
File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 134, in __readAuthType
distro_name = get_distro_name().lower()
File "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py", line 80, in get_distro_name
os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'
error: Failed to install Plugin.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins.Visit http://hplipopensource.com for more infomation.
Python 2.7 and 3.8 are installed. The following code seems to fail:
def get_distro_name():
os_name = None
try:
import platform
os_name = platform.dist()[0]
and the call platform.dist() should be deprecated since python2.6.
The file "password.py" contains a function that seems to retrieve the su or sudo password (it listed several distro, but not TC. The file "/tmp/tcloop/hplip/usr/local/share/hplip/base/password.py" is not writeable (it seems located on a read-only filesystem). How could I try to write something in "password.py"? I would like to modify the script and see what happens next.