Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'result' to get info #2

Open
aetherwu opened this issue Aug 3, 2019 · 1 comment
Open

KeyError: 'result' to get info #2

aetherwu opened this issue Aug 3, 2019 · 1 comment

Comments

@aetherwu
Copy link

aetherwu commented Aug 3, 2019

2019-08-03 14:19:01 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 254, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state
state = self.state
File "/config/custom_components/colorfulclouds/weather.py", line 74, in state
skycon = self._realtime_data['result']['realtime']['skycon']
KeyError: 'result'

@0uzu0
Copy link

0uzu0 commented Aug 3, 2019

2019-08-03 14:19:01 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 254, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state
state = self.state
File "/config/custom_components/colorfulclouds/weather.py", line 74, in state
skycon = self._realtime_data['result']['realtime']['skycon']
KeyError: 'result'

检查你的经纬度和api_key设置,这是数据没有获取到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants