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
After setting up the locale to fr_FR.UTF-8 using raspi-configand launching the script, I get the following error :
pi@raspberrypi:~nas-kit $ python3 main/raspi_omv_main.py
Exception in thread Thread-1
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _boostrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "main/raspi_omv_main.py", line 312, in main
page(current_page)
File "/home/pi/nas-kit/main/page.py", line 76, in __call__
eval(cmd)
File "<string>", line 1, in <module>
File "/home/pi/nas-kit/main/page.py", line 99, in page_1_update
pi_msg = pi_read()
File "/home/pi/nas-kit/main/page.py", line 150, in pi_read
"cpu_usage": cpu_usage(),
File "/home/pi/nas-kit/main/page.py", line 106, in cpu_usage
result = round(100 - float(result), 2)
ValueError: could not convert string to float: '80,35'
The problem seems to come fram the fact that the french locale use , as a decimal separator, and not ..
The workaround is to revert back to en_US.UTF-8 locale, but it should be possible to handle this problem using the locale library.
The text was updated successfully, but these errors were encountered:
After setting up the locale to
fr_FR.UTF-8
usingraspi-config
and launching the script, I get the following error :The problem seems to come fram the fact that the french locale use
,
as a decimal separator, and not.
.The workaround is to revert back to en_US.UTF-8 locale, but it should be possible to handle this problem using the
locale
library.The text was updated successfully, but these errors were encountered: