Plugin installation failed: NameError: name 'get_distro_std_name' is not defined. Did you mean: 'get_distro_name'?

Bug #2003739 reported by brian_p
54
This bug affects 11 people
Affects Status Importance Assigned to Milestone
HPLIP
Confirmed
Undecided
Unassigned
hplip (Debian)
Fix Released
Unknown

Bug Description

We have a bug on Debian with hplip-3.22.10. The user's report
is at

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029459

Both hp-plugin and './hplip-3.22.10-plugin.run' fail. There
appears to have been some change in

  /usr/share/hplip/base/password.py

that might have been the cause.

Regards,

Brian.

Revision history for this message
Alejandra (alexter42) wrote :

+1

Revision history for this message
Luke Diamand (luke-diamand) wrote :

I also get this problem.

Revision history for this message
brian_p (claremont102) wrote :

Debian Bug#1030043 appears to be the same issue.

Revision history for this message
Sadi Yumuşak (sa-yu) wrote :

After proprietary plugin couldn't be installed on Debian 12 (Bookworm) with hplip 3.22.10 installed from repositories, I removed the package to manually install from hplip-3.22.6.run which gave this message:

error: debian-n/a version is not supported, so all dependencies may not be installed. However trying to install using debian-11 version packages.

So, it was only possible to continue with the installation using debian-11 version packages.
This was completed with only this message:

warning: CUPSEXT could not be loaded. Please check HPLIP installation.

Manual installation from hplip-3.22.6-plugin.run however came to the same dead end as hplip-3.22.10-plugin.run

Traceback (most recent call last):
  File "/tmp/selfgz59070/./plugin_install.py", line 75, in <module>
    import class_plugin
    ^^^^^^^^^^^^^^^^^^^
  File "/tmp/selfgz59070/class_plugin.py", line 186, in <module>
    distro_name = get_distro_name().lower()
                  ^^^^^^^^^^^^^^^^^
  File "/tmp/selfgz59070/class_plugin.py", line 65, in get_distro_name
    os_name = platform.dist()[0]
              ^^^^^^^^^^^^^
AttributeError: module 'platform' has no attribute 'dist'

It seems there's a problem with getting distro name, which can be handled by during the installation of hplip, but not proprietary plugin...

Revision history for this message
ED (er-one) wrote :

Same for me, hp-check also has the problem

Revision history for this message
Ron Houk (houk-ron) wrote :

Hello after replacing line 119 in password.py with

```
distro_name = get_distro_name()
```

I was able to install the propriety plugin.

Changed in hplip:
status: New → Confirmed
Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

I can confirm this bug too. This is an issue to fix before 23.04 release imho

Revision history for this message
Dan Cooper (pcfan1234) wrote :
Changed in hplip (Debian):
status: Unknown → Fix Released
Revision history for this message
Milos Ivanovic (mivanovic) wrote :

Ubuntu 23.04 has been released with this bug, while the fix is already available in Debian. Please fix it ASAP.

Revision history for this message
Paul Dooley (pilotpaul) wrote :

I can confirm the workaround in comment #6 works under Ubuntu 23.04, pending the fix from Debian being incorporated into the Ubuntu repositories.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.