首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu 23.04上的HPLIP工具箱崩溃

Ubuntu 23.04上的HPLIP工具箱崩溃
EN

Ask Ubuntu用户
提问于 2023-04-26 13:21:51
回答 1查看 199关注 0票数 0

我使用的是从存储库安装的HPLIP,因为HPLIP下载中的HPLIP通常由于依赖关系问题而不安装。

打开HPLIP工具箱时,主要原因是/usr/share/hplip/toolbox.py。如果我运行这个Phython,我会得到:

代码语言:javascript
复制
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,并将get_distro_std_name()替换为get_distro_name(),用于以前的Ubuntu,22.10。

代码语言:javascript
复制
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代码的团队报告?

问候

EN

回答 1

Ask Ubuntu用户

发布于 2023-04-26 13:34:00

我实现的解决方案是编辑文件/usr/share/hplip/base/password.py,并将get_distro_std_name()替换为get_distro_name(),用于以前的Ubuntu,22.10。

第119行:从distro_name = get_distro_std_name(os_name)

到distro_name = get_distro_name().lower().replace(“","")

和来自distro_name = get_distro_std_name(os_name)的第323行

到distro_name = get_distro_name().lower()

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1465388

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档