Speedtest feature not working
Hi, when I try to run a speedtest with Jarvis it keeps spinning indefinitely. I have this issue after getting rid of the spinner :
Traceback (most recent call last): File "/home/lstgl/github/Jarvis/env/lib/python3.10/site-packages/speedtest.py", line 1493, in get_best_server fastest = sorted(results.keys())[0] IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/lstgl/github/Jarvis/jarviscli/CmdInterpreter.py", line 286, in try_do do(self, s) File "/home/lstgl/github/Jarvis/jarviscli/plugin.py", line 226, in _plugin_run_with_network_error run_func(jarvis, s) File "/home/lstgl/github/Jarvis/jarviscli/plugin.py", line 208, in run self._backend[0](jarvis.get_api(), s) File "/home/lstgl/github/Jarvis/jarviscli/plugins/speed_test.py", line 19, in speedtest res.get_best_server() File "/home/lstgl/github/Jarvis/env/lib/python3.10/site-packages/speedtest.py", line 1495, in get_best_server raise SpeedtestBestServerFailure('Unable to connect to servers to ' speedtest.SpeedtestBestServerFailure: Unable to connect to servers to test latency.
It seems that the speedtest-cli Python module doesn't work anymore, this is what I get when I try to run it from the terminal : ERROR: Unable to connect to servers to test latency.
An idea may be to switch to the ookla speedtest cli : https://www.speedtest.net/apps/cli It would need to change the way the plugin works but I can look at it if you want !
Hey, thanks for reporting this bug. It's weird though, since it's working for me as intended.
speedtest
Running the test \
Running the test /
Speed test results:
Download: XXX Mbps
Upload: XXX Mbps
Is it possible, the issue is on your end - like a firewall blocking some services? Or a temporary network failure on speedtest end?
But we should fix the crash and print something instead like "no server found". That's definitely a bug!
An idea may be to switch to the ookla speedtest cli : https://www.speedtest.net/apps/cli
The current speed test plugin is already using speedtest.net. The official ookla-app does require installation of software, so I prefer the current pure-python implementation.
Nevertheless, would be fine for me, if the speedtest-plugin is changed to detect ookla's speedtest-binary and use it instead if present.