Integration:
https://www.home-assistant.io/integrations/postnl/
Description of problem:
The PostNL component seems to be broken again, shortly after a fix has been applied. A bug report is ongoing in the connected library: https://github.com/iMicknl/python-postnl-api/issues/17
So far research is still on going and no active solution yet. It seems to break for all HA versions and sooner or later people might experience this issue.
This issue is merely to proactively have this issue in the issue list, being able to add an alert and connect it with mentioned library.
Is this the same error?
Hassio 0.103.0
2019-12-15 11:29:06 ERROR (SyncWorker_3) [homeassistant.components.postnl.sensor] Can't connect to the PostNL webservice
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 179, in _request_login
data = response.json()
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/postnl/sensor.py", line 46, in setup_platform
api = PostNL_API(username, password)
File "/usr/local/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 57, in __init__
self._request_login()
File "/usr/local/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 182, in _request_login
raise (UnauthorizedException())
postnl_api.postnl_api.UnauthorizedException
I also see the same error as above:
Hassio 0.103.5
2020-01-05 16:05:29 ERROR (SyncWorker_16) [homeassistant.components.postnl.sensor] Can't connect to the PostNL webservice
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 179, in _request_login
data = response.json()
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/postnl/sensor.py", line 46, in setup_platform
api = PostNL_API(username, password)
File "/usr/local/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 57, in __init__
self._request_login()
File "/usr/local/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 182, in _request_login
raise (UnauthorizedException())
postnl_api.postnl_api.UnauthorizedException
Same here, homeassistant 0.103.6
2020-01-08 18:36:40 ERROR (SyncWorker_14) [homeassistant.components.postnl.sensor] Can't connect to the PostNL webservice
Traceback (most recent call last):
File "/opt/homeassistant/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 179, in _request_login
data = response.json()
File "/opt/homeassistant/lib/python3.7/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/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)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homeassistant/lib/python3.7/site-packages/homeassistant/components/postnl/sensor.py", line 46, in setup_platform
api = PostNL_API(username, password)
File "/opt/homeassistant/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 57, in __init__
self._request_login()
File "/opt/homeassistant/lib/python3.7/site-packages/postnl_api/postnl_api.py", line 182, in _request_login
raise (UnauthorizedException())
postnl_api.postnl_api.UnauthorizedException
It is an (Python) API issue, that they are trying to resolve (see here for example: https://github.com/iMicknl/python-postnl-api/pull/22)
I got in touch today with PostNL and it seems they are willing to help out. Will post updates in the Lovelace thread if there is any development on this.
Most helpful comment
I got in touch today with PostNL and it seems they are willing to help out. Will post updates in the Lovelace thread if there is any development on this.