FaserF / ha-rewe

Rewe Discounts Homeassistant Integration
GNU General Public License v3.0
15 stars 4 forks source link

Integration suddenly not working #15

Closed luccajan closed 1 year ago

luccajan commented 1 year ago

Since a few days the integration refuses to work. I tried reinstalling and tried a diffrent store but to no avail. This is the output from the HA log:


Cannot retrieve discounts for: [NUMBERS] - Maybe a typo or the server rejected the request.

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, 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/rewe/sensor.py", line 136, in async_update
    data = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/rewe/sensor.py", line 202, in fetch_rewe_discounts
    data = self._session.get(url).json()
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FaserF commented 1 year ago

This is a upstream issue, which will be kept tracking of here: https://github.com/foo-git/rewe-discounts/issues/14

I can fix it within the integration once rewe-discounts got the fix.

FaserF commented 1 year ago

Should be fixed with the new release 2023.06.0

luccajan commented 1 year ago

It works now thank you!