| 本帖最后由 suwill 于 2019-2-12 11:24 编辑 
 
2月 12 11:22:35 mossbian hass[1183]: 2019-02-12 11:22:35 ERROR (MainThread) [homeassistant.components.weather] Error while setting up platform colorfulclouds
2月 12 11:22:35 mossbian hass[1183]: Traceback (most recent call last):
2月 12 11:22:35 mossbian hass[1183]:   File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
2月 12 11:22:35 mossbian hass[1183]:     SLOW_SETUP_MAX_WAIT, loop=hass.loop)
2月 12 11:22:35 mossbian hass[1183]:   File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
2月 12 11:22:35 mossbian hass[1183]:     return fut.result()
2月 12 11:22:35 mossbian hass[1183]:   File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
2月 12 11:22:35 mossbian hass[1183]:     raise self._exception
2月 12 11:22:35 mossbian hass[1183]:   File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
2月 12 11:22:35 mossbian hass[1183]:     result = self.fn(*self.args, **self.kwargs)
2月 12 11:22:35 mossbian hass[1183]:   File "/home/homeassistant/.homeassistant/custom_components/weather/colorfulclouds.py", line 28, in setup_platform
2月 12 11:22:35 mossbian hass[1183]:     name=config.get(CONF_NAME, 'colorfulclouds'))])
2月 12 11:22:35 mossbian hass[1183]:   File "/home/homeassistant/.homeassistant/custom_components/weather/colorfulclouds.py", line 40, in __init__
2月 12 11:22:35 mossbian hass[1183]:     self.update()
2月 12 11:22:35 mossbian hass[1183]:   File "/home/homeassistant/.homeassistant/custom_components/weather/colorfulclouds.py", line 95, in update
2月 12 11:22:35 mossbian hass[1183]:     self._realtime_data = json.loads(json_text)
2月 12 11:22:35 mossbian hass[1183]:   File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
2月 12 11:22:35 mossbian hass[1183]:     s.__class__.__name__))
2月 12 11:22:35 mossbian hass[1183]: TypeError: the JSON object must be str, not 'bytes'
 
 0.87用不起
 |