You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bpytop crash since quite a few versions, sorry I am vague, I allways postponed openning a bug report.
To Reproduce
bpytop is just crash at the end of startup
Expected behavior
No crash ;)
Info (please complete the following information):
bpytop version: 1.0.62
psutil version: 5.8.0 (version 5.7.0 or above is required)
(Linux) Linux distribution and version: PureOS amber-phone
Terminal used: ssh bash and local terminal
Font used: not sure how to get that
Python version: 3.8.6
Additional context
Here is the content of the error.log file
18/02/21 (19:21:08) | INFO: New instance of bpytop version 1.0.62 started with pid 3329
18/02/21 (19:21:08) | INFO: Loglevel set to DEBUG
18/02/21 (19:21:08) | DEBUG: Using psutil version 5.8.0
18/02/21 (19:21:08) | DEBUG: CMD: /home/purism/.asdf/installs/python/3.8.6/bin/bpytop --debug
18/02/21 (19:21:08) | INFO: Config file version and bpytop version missmatch, will be recreated on exit!
18/02/21 (19:21:14) | ERROR: Data collection thread failed with exception: unsupported operand type(s) for /: 'int' and 'bytes'
Traceback (most recent call last):
File "/home/purism/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/bpytop.py", line 2913, in _runner
collector._draw()
File "/home/purism/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/bpytop.py", line 3205, in _draw
CpuBox._draw_fg()
File "/home/purism/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/bpytop.py", line 1896, in _draw_fg
if CONFIG.show_battery and cls.battery_activity():
File "/home/purism/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/bpytop.py", line 1816, in battery_activity
if not hasattr(psutil, "sensors_battery") or psutil.sensors_battery() == None:
File "/home/purism/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/psutil/__init__.py", line 2288, in sensors_battery
return _psplatform.sensors_battery()
File "/home/purism/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/psutil/_pslinux.py", line 1455, in sensors_battery
secsleft = int(energy_now / power_now * 3600)
TypeError: unsupported operand type(s) for /: 'int' and 'bytes'
18/02/21 (19:21:14) | WARNING: Exiting with errorcode (1). Runtime 0:00:06```
The text was updated successfully, but these errors were encountered:
@nokernel
Hi, the issue is happening in the psutil library, so you'll need to report it to https://github.com/giampaolo/psutil
The problem seems to be that your one of energy_now and power_now files that reports the battery status doesn't contain an integer value but a byte value.
Should be a easy fix by checking and converting the types before the calculation.
@nokernel
Hi, the issue is happening in the psutil library, so you'll need to report it to https://github.com/giampaolo/psutil
The problem seems to be that your one of energy_now and power_now files that reports the battery status doesn't contain an integer value but a byte value.
Should be a easy fix by checking and converting the types before the calculation.
Describe the bug
On Librem5 phone with PureOS amber version.
Bpytop crash since quite a few versions, sorry I am vague, I allways postponed openning a bug report.
To Reproduce
bpytop
is just crash at the end of startupExpected behavior
No crash ;)
Info (please complete the following information):
1.0.62
5.8.0
(version 5.7.0 or above is required)3.8.6
Additional context
Here is the content of the error.log file
The text was updated successfully, but these errors were encountered: