core: SpeedTest throws unhandled exception in 2021.4.0

The problem

Starting with 2021.4.0, the SpeedTest integration throws an unhandled exception on startup.

What is version of Home Assistant Core has the issue?

2021.4.0

What was the last working version of Home Assistant Core?

2021.4.0b3

What type of installation are you running?

Home Assistant Container

Integration causing the issue

SpeedTest

Link to integration documentation on our website

https://www.home-assistant.io/integrations/speedtestdotnet/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/speedtestdotnet/__init__.py:194 
First occurred: 5:48:13 PM (1 occurrences) 
Last logged: 5:48:13 PM

Error setting up entry SpeedTest for speedtestdotnet
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/speedtestdotnet/__init__.py", line 75, in async_setup_entry
    await coordinator.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/speedtestdotnet/__init__.py", line 194, in async_setup
    self.api = await self.hass.async_add_executor_job(speedtest.Speedtest)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/speedtest.py", line 1091, in __init__
    self.get_config()
  File "/usr/local/lib/python3.8/site-packages/speedtest.py", line 1173, in get_config
    ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 27
  • Comments: 26 (9 by maintainers)

Most upvoted comments

This temporary solution by paeore worked for some sivel/speedtest-cli#769 (comment)

if you update to 2021.4.1, it will be fixed permanently

Seems it could be an issue with speedtest-cli

https://github.com/sivel/speedtest-cli/pull/769

The upstream issue was just resolved. So if the dependency version in HA gets updated, this issue should be solved. I will prepare a PR shortly.

https://github.com/sivel/speedtest-cli/commit/42e96b13dda2afabbcec2622612d13495a415caa

workaround on linux. open terminal and run

curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3

Or just update to HA version 2021.4.1 instead. No need for any manual workarounds.

Yes, that is known. It just by accident coincided with the HA release, but has no relation to it.

In the repo they discussed the issue and that it appeared in the last 24hrs or so, also its an issue that ookla have introduce not with the speedtest-cli