peternijssen / lovelace-postnl-card

Lovelace card for PostNL
MIT License
26 stars 9 forks source link

After a while, PostNL API no longer responds, need to update password? #22

Closed koenrijpkema closed 4 years ago

koenrijpkema commented 4 years ago

Had this happen before, after a month orso, the API no longer lets the component login:

Can't connect to the PostNL API Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/postnlpy/postnlapi.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 518, 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 "/config/custom_components/postnl/sensor.py", line 43, in setup_platform api = PostnlApi(username, password, refresh_rate.total_seconds()) File "/usr/local/lib/python3.7/site-packages/postnlpy/postnlapi.py", line 62, in init self._request_login() File "/usr/local/lib/python3.7/site-packages/postnlpy/postnlapi.py", line 182, in _request_login raise (UnauthorizedException()) postnlpy.postnlapi.UnauthorizedException

However, if I test the login details, they work fine on the website. I can get the component to work again, if I change my password.

peternijssen commented 4 years ago

The PostNL component seems to be broken. See https://github.com/home-assistant/home-assistant/issues/28726

koenrijpkema commented 4 years ago

Still broken in 102.1 for me:

Fri Nov 22 2019 12:17:19 GMT+0100 (Central European Standard Time) Can't connect to the PostNL API Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/postnlpy/postnlapi.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 "/config/custom_components/postnl/sensor.py", line 43, in setup_platform api = PostnlApi(username, password, refresh_rate.total_seconds()) File "/usr/local/lib/python3.7/site-packages/postnlpy/postnlapi.py", line 62, in init self._request_login() File "/usr/local/lib/python3.7/site-packages/postnlpy/postnlapi.py", line 182, in _request_login raise (UnauthorizedException()) postnlpy.postnlapi.UnauthorizedException

IIIdefconIII commented 4 years ago

same here + three collegues, all the same error

JanLankhorst commented 4 years ago

Same here, a solution or workaround would be nice

peternijssen commented 4 years ago

Just follow this thread; https://github.com/home-assistant/home-assistant/issues/28726

Closing this issue as it's part of HA and not the card.