mawaqit / home-assistant

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

Error setting up entry Mawaqit for mawaqit_prayer_times #14

Closed mouledla closed 2 years ago

mouledla commented 2 years ago

Assalamu ʿalaykum

I suddenly get below error for my mawaqit prayer times integration: I did not change anything and i am running Home Assistant OS version core-2022.4.7.

Can someone please help me? I already tried restarting and deleting and reinstalling the mawaqit integration. I cant seeem to figure out what happened.

Logger: homeassistant.config_entries Source: custom_components/mawaqit_prayer_times/init.py:286 Integration: Mawaqit Prayer Times First occurred: 17:57:01 (1 occurrences) Last logged: 17:57:01

Error setting up entry Mawaqit for mawaqit_prayer_times Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.9/site-packages/simplejson/init.py", line 525, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.9/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_prayer_times/init.py", line 285, in async_setup await self.hass.async_add_executor_job(self.get_new_prayer_times) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/mawaqit_prayer_times/init.py", line 115, in get_new_prayer_times calc = MawaqitTimesCalculator( File "/usr/local/lib/python3.9/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.9/site-packages/mawaqit_times_calculator/pray_times_calculator.py", line 66, in all_mosques_neighberhood api = self.apimawaqit() File "/usr/local/lib/python3.9/site-packages/mawaqit_times_calculator/pray_times_calculator.py", line 54, in apimawaqit return response.json()["apiAccessToken"] File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 917, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value] <!DOCTYPE html>

mawaqit.net | 502: Bad gateway

Error 502

Ray ID: 7049b5dd4384fa30 • 2022-05-01 15:57:00 UTC

Bad gateway

You

Browser

Working
Amsterdam

Cloudflare

Working
mawaqit.net

Host

Error

What happened?

The web server reported a bad gateway error.

What can I do?

Please try again in a few minutes.

: 0

During handling of the above exception, another exception occurred:

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

MehdiTouns31 commented 2 years ago

Salemoua3laykoum,

I have the same problem...

mouledla commented 2 years ago

I hope someone can help us in sha allah