FS#71587 - [glances] Requires python-defusedxml

Attached to Project: Community Packages
Opened by José Luis Salvador Rufo (jlsalvador) - Thursday, 22 July 2021, 23:17 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 06 November 2021, 16:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 28
Private No

Details

Description:
The version 3.2.1 requires the python defusedxml

Steps to reproduce:
Run `glances`

```
Traceback (most recent call last):
File "/usr/bin/glances", line 33, in <module>
sys.exit(load_entry_point('Glances==3.2.1', 'console_scripts', 'glances')())
File "/usr/bin/glances", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/glances/__init__.py", line 46, in <module>
from glances.main import GlancesMain
File "/usr/lib/python3.9/site-packages/glances/main.py", line 27, in <module>
from glances.compat import input, disable, enable
File "/usr/lib/python3.9/site-packages/glances/compat.py", line 48, in <module>
from defusedxml.xmlrpc import monkey_patch
ModuleNotFoundError: No module named 'defusedxml'
```
This task depends upon

Closed by  Christian Rebischke (Shibumi)
Saturday, 06 November 2021, 16:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  glances-3.2.3-2
Comment by José Luis Salvador Rufo (jlsalvador) - Thursday, 22 July 2021, 23:18 GMT
Please, add the dependency `python-defusedxml`, thanks.
Comment by Rafael A. Fdez Ruiz (ferurant) - Tuesday, 27 July 2021, 17:51 GMT
In case it were help, I have solved it with:
sudo pacman -Sy python-pip psutils
sudo pip3 install defusedxml
Greetings
Comment by Martin Rys (C0rn3j) - Sunday, 01 August 2021, 19:06 GMT
That does not help, quite the opposite, installing things system-wide with other package managers will only wreck your system. Pip has a --user flag.

The correct thing is to install python-defusedxml, which you now likely can't do without undoing the pip install.

You will run into issues when this bug is closed and the package is added to depends.
Comment by Tyler Holinka (tholinka) - Tuesday, 10 August 2021, 17:22 GMT
Receiving error: ModuleNotFoundError: No module named 'defusedxml'

Fixed by: pacman -S python-defusedxml
Comment by Radek Podgorny (rpodgorny) - Wednesday, 11 August 2021, 07:19 GMT
@tholinka: that's a workaround, not a fix... ;-)
Comment by Marcus Franke (Comradin) - Monday, 16 August 2021, 05:20 GMT
I was going to report the missing debendency as a new bug, but found this one.

I came to the same solution as @tholinka, installing the python-defusedxml package manually. Even de- and reinstalled the glances package to check if the dependency has been added yet.

Adding this package as a runtime dependency would be the solution, manual installation is indeed just a workaround. @rpodgorny

Solution would look like this in the PKGBUILD file:
```
depends=('python' 'python-psutil' 'python-future' 'python-defusedxml')
```
Comment by Nick Less (TBog) - Friday, 20 August 2021, 10:33 GMT
Workaround: `pacman -S --asdeps python-defusedxml`
Comment by osh moz (oshmoz) - Sunday, 29 August 2021, 08:48 GMT
The package was updated today to version 3.2.2 but the bug is still there for me.
Comment by TheFrenchGhosty (TheFrenchGhosty) - Monday, 20 September 2021, 13:22 GMT
Still an issue.
Comment by Nergar (nergar) - Sunday, 26 September 2021, 05:58 GMT
What's keeping this seemingly simple fix from going forward? And why is the priority so low if glances doesn't even run without any manual fix?
Comment by Jeremy Cantrell (jmcantrell) - Thursday, 30 September 2021, 05:13 GMT
It's listed as a required dependency in `setup.py` (https://github.com/nicolargo/glances/blob/v3.2.2/setup.py#L44). Is this not as simple as `depends+=python-defusedxml` in the PKGBUILD (as has already been stated)? The only other change required would be to bump pkgrel.
Comment by Leon Mergen (solatis) - Friday, 22 October 2021, 17:50 GMT
I can confirm that this issue is still there, and manually installing the python dependency fixes the issue.

What needs to be done to get this fixed properly, and how can I help?
Comment by Lietu (Lietu) - Tuesday, 02 November 2021, 09:36 GMT
Just stepped in the same minefield as well, though I was on Manjaro ARM64 which apparently inherits this issue from here.
Comment by Matt C (SomethingGeneric) - Thursday, 04 November 2021, 17:02 GMT
@Jeremy Cantrell it sure seems like it is.

Here's a patch for whoever can push the change :)

Loading...