-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensors_temperatures no such file error #966
Comments
Shit! I am also on Ubuntu 16.04 and I have that file (but I don't have charge_now as you do). It appears /sys/class/power_supply directory structure is not reliable. :-\ |
@nicolargo can you try this, then take a look at the output of
|
@giampaolo The https://gist.github.com/nicolargo/292c0c6c9ea935c08b5163549e473c20 return None on my system... Here is the return of acpi -b:
|
@nicolargo I think this one should work:
|
Yes it is !
|
OK, good. Is |
Always display power_plugged=False either the cable is connected or not... Another issue if i unplug and plug it and quickly run the script i have the following error:
|
OK, I committed that change so now this should be fixed. As for the power cable, that is determined by:
E.g., now it's |
1f30d13 should fix the IOError you bumped into by disconnecting the power cable. If that happens it should now return None. |
Ok it works ! None is returned instead of exception. I also confirm that i do not have any /sys/class/power_supply/AC0/online file... |
@nicolargo what about |
It return "Full".... |
…ere; fallback on using /BAT0/status instead
@nicolargo how about 0a02bdc? |
OK, new version is out. |
Thanks @giampaolo ! |
You're welcome. If you decide to use this in glances please report back if you bump into any issue. These APIs are new and not tested in production. |
@giampaolo psutil 5.1.x:
The last two are wrong on my laptop. In fact:
Also, I don't have
Using
|
I don't understand how Lines 1154 to 1161 in fef8ef0
|
|
Could you try to understand why?
...then it should return |
It's a Python 2 vs 3 issue. Python 2:
Python 3:
|
I see the problem now (typing one). Thanks. Fix is coming. |
This should now be fixed in ca01be5. Can you please verify? |
|
No that is correct. If power cable is connected it is supposed to return POWER_TIME_UNLIMITED. |
Ah, just an oversight. It works, thanks. |
OK, psutil 5.1.2 is out. |
On my Dell XPS 13 on Ubuntu 16.04, with the latest 5.1.0 release and Puthon 2.7, i have the following error:
When i have a look on the /sys/class/power_supply/BAT0/ folder, no energy_now file but another ones:
The text was updated successfully, but these errors were encountered: