mawaqit / home-assistant

Mawaqit integration - salat time and nearest mosque - in Home Assistant
60 stars 16 forks source link

Erreur intégration Mawaqit (HomeAssistant) #25

Closed YNK22 closed 2 years ago

YNK22 commented 2 years ago

Salam wa ahleycoum, Depuis quelques jours j'ai cette erreur sur l'intégration mawaqit:

`Cette erreur provient d'une intégration personnalisée

Logger: homeassistant.config_entries Source: custom_components/mawaqit/init.py:286 Integration: mawaqit First occurred: 19:39:56 (1 occurrences) Last logged: 19:39:56

Error setting up entry Mawaqit for mawaqit_prayer_times 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 525, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.10/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/mawaqit/init.py", line 285, in async_setup await self.hass.async_add_executor_job(self.get_new_prayer_times) 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/mawaqit/init.py", line 115, in get_new_prayer_times calc = MawaqitTimesCalculator( File "/usr/local/lib/python3.10/site-packages/mawaqit_times_calculator/pray_times_calculator.py", line 31, in init if self._mosquee == '' and len(self.all_mosques_neighberhood())>0: File "/usr/local/lib/python3.10/site-packages/mawaqit_times_calculator/pray_times_calculator.py", line 66, in all_mosques_neighberhood api = self.apimawaqit() File "/usr/local/lib/python3.10/site-packages/mawaqit_times_calculator/pray_times_calculator.py", line 54, in apimawaqit return response.json()["apiAccessToken"] 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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/mawaqit/init.py", line 72, in async_setup_entry if not await client.async_setup(): File "/config/custom_components/mawaqit/init.py", line 286, in async_setup except (exceptions.InvalidResponseError, ConnError) as err: NameError: name 'exceptions' is not defined `

YNK22 commented 2 years ago

J'ai supprimé complètement l'intégration, relancer home assistant puis réinstaller et tout est bon