Skip to content

Speedtest Exception - Suspect Due to Config Change #4

@dalgarin

Description

@dalgarin

Currently receiving this error:

Traceback (most recent call last):
  File "/usr/bin/speedtest-cli", line 9, in <module>
    load_entry_point('speedtest-cli-datadog==0.2.0', 'console_scripts', 'speedtest-cli')()
  File "/usr/lib/python2.7/site-packages/speedtest.py", line 1986, in main
    shell()
  File "/usr/lib/python2.7/site-packages/speedtest.py", line 1875, in shell
    secure=args.secure
  File "/usr/lib/python2.7/site-packages/speedtest.py", line 1091, in __init__
    self.get_config()
  File "/usr/lib/python2.7/site-packages/speedtest.py", line 1174, in get_config
    map(int, server_config['ignoreids'].split(','))
ValueError: invalid literal for int() with base 10: ''

Digging in to the code, the referenced line 1174 is attempting to parse the ignoreids value from the config retrieved from here: https://www.speedtest.net/speedtest-config.php

It appears that ignoreids is now empty (assuming this is a recent change), which is resulting in an attempt to convert '' to an int. This should be simple enough to resolve (e.g. try or if block) with an example below:

        if(server_config['ignoreids'] != ""):
            ignore_servers = list(
                map(int, server_config['ignoreids'].split(','))
            )
        else:
            ignore_servers = []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions