Stats error
reysonk opened this issue · 7 comments
reysonk commented
Thank you for your wonderful bot, how to cure the problem?
when entering a command /stats, such an error occurs in the log
'coretemp'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 242, in handler_worker
await self.loop.run_in_executor(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/src/bot.py", line 116, in stats_command
f"**CPU температура:** {psutil.sensors_temperatures()['coretemp'][0].current}°C\n" \
KeyError: 'coretemp'
ch3p4ll3 commented
@reysonk Hi, what happens if you print psutil.sensors_temperatures()? Maybe you could have different sensor names
reysonk commented
ch3p4ll3 commented
@reysonk sorry, maybe I explained myself wrong. You should open a python terminal, import psutils and then run the command
reysonk commented
reysonk commented
reysonk commented
it's decided