Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1030043: hplip-gui: traceback when launching hp-toolbox

281 views
Skip to first unread message

Julien Patriarca

unread,
Jan 30, 2023, 11:40:04 AM1/30/23
to
Package: hplip-gui
Version: 3.22.10+dfsg0-1
Severity: grave
Tags: patch
Justification: renders package unusable

Dear Maintainer,

* What led up to the situation?
Trying to launch hp-toolbox software, got this output:

Traceback (most recent call last):
File "/usr/bin/hp-toolbox", 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'?


* What exactly did you do (or not do) that was effective (or
ineffective)?

I patched the password.py file with the correct function name and
delete the os_name parameter when being called.

* What was the outcome of this action?

Positive. The hp-toolbox launched succesfully.



-- Package-specific info:
Saving output in log file: /home/julien/hp-check.log

HP Linux Imaging and Printing System (ver. 3.22.10)
Dependency/Version Check Utility ver. 15.1

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.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).


-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing'), (10, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-1-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages hplip-gui depends on:
ii dbus-user-session [default-dbus-session-bus] 1.14.4-1
ii hplip 3.22.10+dfsg0-1
ii python3-dbus.mainloop.pyqt5 5.15.7+dfsg-3+b3
ii python3-pyqt5 5.15.7+dfsg-3+b3

Versions of packages hplip-gui recommends:
ii python3-notify2 0.3-5
ii simple-scan 42.5-2

hplip-gui suggests no packages.

-- no debconf information
patch_password.diff
patch_password.diff
patch_password.diff

Ryan Thoryk

unread,
Feb 7, 2023, 11:10:04 PM2/7/23
to
Changing line 119 in /usr/share/hplip/base/password.py
from:
get_distro_std_name(os_name)
to:
get_distro_name()

appears to fix the issue.

--
Ryan Thoryk
ry...@thoryk.com
ry...@tliquest.net

Luke Diamand

unread,
Feb 11, 2023, 7:00:04 AM2/11/23
to
On Tue, 7 Feb 2023 21:52:11 -0600 Ryan Thoryk <ry...@thoryk.com> wrote:
> Changing line 119 in /usr/share/hplip/base/password.py
> from:
> get_distro_std_name(os_name)
> to:
> get_distro_name()
>
> appears to fix the issue.

With this change I see a different error when running hp-check:

-Traceback (most recent call last):
File "/usr/bin/hp-check", line 861, in <module>
dep.core.init()
File "/usr/share/hplip/installer/core_install.py", line 523, in init
self.get_distro()
File "/usr/share/hplip/installer/core_install.py", line 661, in
get_distro
if 'MX' in distro_release_name:
^^^^^^^^^^^^^^^^^^^
NameError: name 'distro_release_name' is not defined

Looking at the code, distro_release_name really just is not present in
that file anywhere that I can see.

JHM-O

unread,
Feb 22, 2023, 1:30:04 PM2/22/23
to
Dear Ryan

Comment out line 661-663 in file "core_install.py" and your problem is
solved

Greetings
Jan Outhuis
0 new messages