- 积分
- 644
- 金钱
- 580
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 644
- 金钱
- 580
- HASS币
- 0
|
发表于 2021-7-12 11:02:06
|
显示全部楼层
请教下大神,这个报错是什么情况啊?是没有弄好吗?
日志如下
Logger: homeassistant.helpers.entity
Source: custom_components/baidu_face/sensor.py:169
Integration: baidu_face (documentation)
First occurred: 上午10:25:01 (1 occurrences)
Last logged: 上午10:25:01
Update for sensor.face_indentity fails
Traceback (most recent call last):
File "/data/data/com.termux/files/home/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 316, in async_update_ha_state
await self.async_device_update()
File "/data/data/com.termux/files/home/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 524, in async_device_update
raise exc
File "/data/data/com.termux/files/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/data/data/com.termux/files/home/.homeassistant/custom_components/baidu_face/sensor.py", line 138, in update
self.face_searching()
File "/data/data/com.termux/files/home/.homeassistant/custom_components/baidu_face/sensor.py", line 169, in face_searching
ret = self._baidu_client.multiSearch(encode_img, image_type, self._group_list, self._options)
File "/data/data/com.termux/files/home/homeassistant/lib/python3.8/site-packages/aip/face.py", line 100, in multiSearch
return self._request(self.__multiSearchUrl, json.dumps(data, ensure_ascii=False), {
File "/data/data/com.termux/files/home/homeassistant/lib/python3.8/site-packages/aip/base.py", line 100, in _request
obj = self._proccessResult(response.content)
File "/data/data/com.termux/files/home/homeassistant/lib/python3.8/site-packages/aip/base.py", line 145, in _proccessResult
return json.loads(content.decode()) or {}
File "/data/data/com.termux/files/usr/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/data/data/com.termux/files/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/data/data/com.termux/files/usr/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)
|
|