我正在使用从存储库安装的 HPLIP,因为由于依赖性问题,从 HPLIP 下载的 HPLIP 通常无法安装。
当我打开 HPLIP 工具箱时,我崩溃了,主要原因是 /usr/share/hplip/toolbox.py。如果我运行这个 Phython,我会得到:
HP Linux Imaging and Printing System (ver. 3.22.10)
HP Device Manager ver. 15.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/toolbox.py", line 280, in <module>
toolbox = ui.DevMgr5(__version__, device_uri, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/hplip/ui5/devmgr5.py", line 238, in __init__
core = CoreInstall(MODE_CHECK)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/hplip/installer/core_install.py", line 240, in __init__
self.passwordObj = password.Password(ui_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/hplip/base/password.py", line 94, in __init__
self.__readAuthType() # self.__authType
^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/hplip/base/password.py", line 119, in __readAuthType
distro_name = get_distro_std_name(os_name)
^^^^^^^^^^^^^^^^^^^
NameError: name 'get_distro_std_name' is not defined. Did you mean: 'get_distro_name'?
我实施的解决方案是编辑文件 /usr/share/hplip/base/password.py 并用之前的 Ubuntu 22.10 上使用的 get_distro_name() 替换 get_distro_std_name()。
Line 119:
From
distro_name = get_distro_std_name(os_name)
To
distro_name = get_distro_name().lower().replace(" ","")
Line 323
From
distro_name = get_distro_std_name(os_name)
To
distro_name = get_distro_name().lower()
如何向负责 Ubuntu HPLIP 代码的团队报告此事?
问候
答案1
我实施的解决方案是编辑文件 /usr/share/hplip/base/password.py 并用之前的 Ubuntu 22.10 上使用的 get_distro_name() 替换 get_distro_std_name()。
第 119 行:来自 distro_name = get_distro_std_name(os_name)
至 distro_name = get_distro_name().lower().replace(" ","")
并且第 323 行来自 distro_name = get_distro_std_name(os_name)
至 distro_name = get_distro_name().lower()
答案2
听从了 Fernando Sprocati 的建议,现在我的 HPLIP Toolbox 启动了。这是在 23.04 的完全干净安装上进行的。