Support Requests - CLICK TO READ BEFORE POSTING


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Python dist-packages problem? -- null distro/platform name
#1

In attempting to install my HP P1606dn printer, I learned that an additional piece of code beyond the HPLIP 3.20.11 provided materials is required.  To install this support module, HP provides HPLIP-3.20.11-plugin.run, a python script.  This script uses platform.dist()[0] to obtain the name of the distribution.  The error message is "AttributeError: module 'platform' has no attribute 'dist'".

The function is in /usr/lib/python3/dist-packages (1.4.0), and "pip install distro" reports "Requirement already satisfied: distro in /usr/lib/python3/dist-packages (1.4.0)"

Code:
+ hp-plugin HP Linux Imaging and Printing System (ver 3.20.11) Plugin Download and Install Utility ver 2.1 qt5ct: using qt5ct plugin Checking for network connection... Downloading plugin from: Traceback (most recent call last):   File "/usr/share/hplip/base/password.py", line 85, in get_distro_name     os_name = platfrom.dist()[0] AttributeError: module 'platfrom' has no attribute 'dist'

The HP helper hp-plugin fails to install for many (non LL) distributions because the packager did not pick up the Python distro package, which is now required for Python 3.8+ because of code removal in 3.8.

So... I went down the chain to see that LL indeed had a usable dist-packages.  All appears well, i.e. the LL distribution is NOT missing the newly required dist-packages. 

However, dist-packages claims to be HIGHLY system dependent, poking around in C libraries and other places to figure out what to report.  See https://pypi.org/project/distro for background.  Also https:docs.python.org/2/library/platform.html section 15.15.5

So may I politely ask if the LL packager needs to do something to have dist-packages report the distribution name?  (I assume it would be Ubuntu, 20.04.x, Focal Fossa).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)