Closed bru73f0rc3 closed 5 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I got this issue also. Try coping the new weatheralerts.py and if that doesn't correct it, try a different "sameid" that covers your area that has the same call sign.
Getting the same issue with the current version of weatheralerts.py, trying to pull in Charlotte NC Mecklenburg County
Error while setting up platform weatheralerts
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/sensor/weatheralerts.py", line 38, in setup_platform
add_devices([WeatherAlertsSensor(sameid)])
File "/config/custom_components/sensor/weatheralerts.py", line 43, in __init__
self.update()
File "/config/custom_components/sensor/weatheralerts.py", line 47, in update
nws = WeatherAlerts(samecodes=self._sameid)
File "/config/deps/lib/python3.6/site-packages/weatheralerts/weather_alerts.py", line 43, in __init__
self.scope = self.geo.getfeedscope(self.samecodes)
File "/config/deps/lib/python3.6/site-packages/weatheralerts/geo.py", line 59, in getfeedscope
states = self._get_states_from_samecodes(geocodes)
File "/config/deps/lib/python3.6/site-packages/weatheralerts/geo.py", line 75, in _get_states_from_samecodes
state = self.samecodes[code]['state']
TypeError: 'NoneType' object is not subscriptable
Not sure if my log will be useful or not..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I am still having this issue.
Which sameid are you using @fortepc ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Same issue here. Have tried a couple diffrent sameid's . Using latest version of the sensor.py file (0.0.3)
CONFIG
- platform: weatheralerts
sameid: '026163'
LOG ERROR
2019-01-30 13:23:43 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform weatheralerts
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/weatheralerts/sensor.py", line 39, in setup_platform
add_devices([WeatherAlertsSensor(sameid)])
File "/config/custom_components/weatheralerts/sensor.py", line 44, in __init__
self.update()
File "/config/custom_components/weatheralerts/sensor.py", line 48, in update
nws = WeatherAlerts(samecodes=self._sameid)
File "/config/deps/lib/python3.6/site-packages/weatheralerts/weather_alerts.py", line 43, in __init__
self.scope = self.geo.getfeedscope(self.samecodes)
File "/config/deps/lib/python3.6/site-packages/weatheralerts/geo.py", line 59, in getfeedscope
states = self._get_states_from_samecodes(geocodes)
File "/config/deps/lib/python3.6/site-packages/weatheralerts/geo.py", line 75, in _get_states_from_samecodes
state = self.samecodes[code]['state']
TypeError: 'NoneType' object is not subscriptable
As I just wrote in #12 this is unstable, try again, your 026163
also works
Version of the cusom_component
weatheralerts.py - _version = '0.0.3' HA 0.76.2
Describe the bug Error while setting up platform weatheralerts: File "/config/deps/lib/python3.6/site-packages/weatheralerts/geo.py", line 75, in _get_states_from_samecodes state = self.samecodes[code]['state'] TypeError: 'NoneType' object is not subscriptable
sameid: '027053'
log