arevindh / pihole-speedtest

Pihole Speedtest Mod
https://arevindh.github.io/pihole-speedtest/
MIT License
215 stars 22 forks source link

Speedtest CLI - python errors #82

Closed ChrisWNY closed 3 years ago

ChrisWNY commented 3 years ago

When using official Speedtest CLI...

Noticed today that when I attempted to run speedtest manually via the command line, I'd get the following error:

sudo pihole -a -sn

Testing Speed Traceback (most recent call last): File "/usr/local/bin/speedtest-cli", line 10, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1930, in main shell() File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1819, in shell secure=args.secure File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1053, in init self.get_config() File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1136, in get_config map(int, server_config['ignoreids'].split(',')) ValueError: invalid literal for int() with base 10: '' Traceback (most recent call last): File "/usr/local/bin/speedtest-cli", line 10, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1930, in main shell() File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1819, in shell secure=args.secure File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1053, in init self.get_config() File "/usr/local/lib/python2.7/dist-packages/speedtest.py", line 1136, in get_config map(int, server_config['ignoreids'].split(',')) ValueError: invalid literal for int() with base 10: '' Connection Failed Retry after 30 sec Connection Failed Retry failed aborting

Not sure if this was caused by a recent update to python modules or something else. Thought I'd post in hopes that further info could be provided. Thanks.

ChrisWNY commented 3 years ago

You can close this issue...the python speedtest module was old, v2.0.3. Updating the module corrected the issue.

sudo python3 -m pip install --upgrade speedtest-cli

evanrh commented 3 years ago

You can fix this error by commenting out lines 1113-1115 by placing a '#' at the beginning of each. After commenting them out, add ignore_servers = [] on line 1116.

arevindh commented 2 years ago

sudo pihole -a -sn this thing is not working anymore ..

use sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh"