Logger: homeassistant.components.sensor
Source: custom_components/chineseholiday/holiday.py:406
Integration: 传感器 (documentation, issues)
First occurred: 上午10:14:59 (1 occurrences)
Last logged: 上午10:14:59
chineseholiday: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/chineseholiday/sensor.py", line 492, in _update
nearest = self.nearest_holiday()
File "/config/custom_components/chineseholiday/sensor.py", line 430, in nearest_holiday
results = self._holiday.getHoliday()
File "/config/custom_components/chineseholiday/holiday.py", line 354, in getHoliday
list = self.getholidayForNMonths()
File "/config/custom_components/chineseholiday/holiday.py", line 390, in getholidayForNMonths
results = self.getonline40dholiday('101010100',str(year),"{:0>2d}".format(m))
File "/config/custom_components/chineseholiday/holiday.py", line 406, in getonline40dholiday
list = json.loads(json_str)
File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)