Closed Tonus1 closed 1 year ago
This seems to be some issue with psutil, but I don't understand it, brcause that is an internal function call.
Will need to do some more investigation.
According to the docs here :
psutil.pid_exists(pid)
Check whether the given PID exists in the current process list. This is faster than doing `pid in psutil.pids()` and should be preferred.
and might have been some changes occuring for psutil.process_iter(attrs=None, ad_value=None)
:
Changed in version 5.3.0: added “attrs” and “ad_value” parameters.
Good point reg. the pid_exists()
, but I don't think this is the issue, because cpu
, for example, only uses the cpu_percentage()
call. Also, I happen to have the exact same version of psutil
installed (5.4.9) and all three modules work for me.
Just to be 100% sure, can you please try the following:
In a shell, enter /usr/bin/env python3
- this should drop you into an interactive shell.
Next, enter import psutil
, followed by psutil.__version__
, and please report the output.
Then, finally, please try psutil.cpu_percent(percpu=False)
and let me know the result of that.
Thank you very much in advance!
Facepalm here !
Your questions and the error I had while importing psutil
made me look at all the packages related : I had an old package without prefix python3-
that was interfering and wouldn't be updated with the good python3-psutil
!
Sorry for the noise !
I still learn not to post in the middle of the night...
Glad this is resolved - and no worries, Python packaging is a really bad mess, in my opinion.
Bug Report
Description
Affected module: cpu,cpu2,caffeine Version used: 2.1.6 from Slackbuilds.org
Get errors when I add these modules :
or
How to reproduce
Install bumblebee-status and module dependencies (wheel-0.37.1, python3-installer-0.5.1, python3-pep517-0.12.0, python3-build-0.7.0, python3-psutil-5.9.4). Add cpu, cpu2 or caffeine module, reload i3wm config.