When running the following sample Python code from the documentation with my FB7560:
fc = FritzStatus(address='192.168.178.1', password='****')
while True:
print(fc.str_transmission_rate)
time.sleep(2)
After a few lines of transmission rates printed, the programm crashes:
Traceback (most recent call last):
File "/app/App.py", line 17, in <module>
print(fc.str_transmission_rate)
File "/usr/local/lib/python3.10/site-packages/fritzconnection/lib/fritzstatus.py", line 142, in str_transmission_rate
return (format_num(upstream), format_num(downstream))
File "/usr/local/lib/python3.10/site-packages/fritzconnection/lib/fritztools.py", line 30, in format_num
num, dim = byte_formatter(num)
File "/usr/local/lib/python3.10/site-packages/fritzconnection/lib/fritztools.py", line 16, in byte_formatter
log = min(int(math.log10(value) / 3), len(dim))
Does not always happen, crash is not reproducible, but it will always happen sooner or later.
Seems a numeric value is invalid (NaN, division by zero, etc).
When running the following sample Python code from the documentation with my FB7560:
After a few lines of transmission rates printed, the programm crashes:
Does not always happen, crash is not reproducible, but it will always happen sooner or later. Seems a numeric value is invalid (NaN, division by zero, etc).