[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem with speedtest-cli



On Fri, 11 Jun, 2021 at 00:08:51 +0800, kaye n wrote:
>    Hello guys
>    kaye@laptop:~$ speedtest-cli
>    Retrieving [1]speedtest.net configuration...
>    Traceback (most recent call last):
>      File "/usr/bin/speedtest-cli", line 11, in <module>
>        load_entry_point('speedtest-cli==2.0.2', 'console_scripts',
>    'speedtest-cli')()
>      File "/usr/lib/python3/dist-packages/speedtest.py", line 1887, in
>    main
>        shell()
>      File "/usr/lib/python3/dist-packages/speedtest.py", line 1783, in
>    shell
>        secure=args.secure
>      File "/usr/lib/python3/dist-packages/speedtest.py", line 1027, in
>    __init__
>        self.get_config()
>      File "/usr/lib/python3/dist-packages/speedtest.py", line 1113, in
>    get_config
>        map(int, server_config['ignoreids'].split(','))
>    ValueError: invalid literal for int() with base 10: ''
>    I don't know what's wrong.
>    Thank you for your time.
>    Kaye
> 

It's a known issue[1]. A workaround is to edit the file /usr/lib/python3/dist-packages/speedtest.py. Remove the following block beginning on line 1112

       ignore_servers = list(
           map(int, server_config['ignoreids'].split(','))
       )

and replace it with

        ignore_servers = [
		    int(i) for i in server_config['ignoreids'].split(',') if i
		]

Hopefully the issue will be fixed in the next stable point release.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986637


Reply to: