From this speedtest-cli Pull Request, I gather the speedtest site have changed something in the response their API gives out. Looking at the first commit in the PR, you just need to modify a single line in speedtest.py.
If you're in Ubuntu or similar, and you have the file in the location shown in your output, you can fix it with:
## Backup original code
sudo gzip -k9 /usr/lib/python3/dist-packages/speedtest.py
## Make the line substitution
sed -i "s/^ map(int, server_config\['ignoreids'\].split(','))$/ map(int, (server_config['ignoreids'].split(',') if len(server_config['ignoreids']) else []) )/" /usr/lib/python3/dist-packages/speedtest.py
EDIT: the final patch is at https://github.com/sivel/speedtest-cli/commit/cadc68, and published in v2.1.3. It's too complex for a simple one-line sed command, but you could still apply it yourself manually. Or you could try downloading that version of the speedtest.py file yourself:
sudo gzip -k9 /usr/lib/python3/dist-packages/speedtest.py
sudo wget https://raw.githubusercontent.com/sivel/speedtest-cli/v2.1.3/speedtest.py \
-O /usr/lib/python3/dist-packages/speedtest.py
(Again, you should double-check the location of the speedtest.py file. The above location seems to be common for Ubuntu, but not across all versions of Unix/Linux.)