mawaqit / home-assistant

Mawaqit integration - salat time and nearest mosque - in Home Assistant
54 stars 15 forks source link

Error after updating to latest version #67

Closed asdkjasdfla closed 2 days ago

asdkjasdfla commented 1 month ago

I get error "Failed to set up: Check the logs"

Debug logs:

`Logger: homeassistant.config_entries Source: config_entries.py:586 First occurred: 22 July 2024 at 19:17:55 (4 occurrences) Last logged: 22:20:57

Error setting up entry MAWAQIT - Madni Masjid for mawaqit Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mawaqit/init.py", line 96, in async_setup_entry if not await client.async_setup(): ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mawaqit/init.py", line 421, in async_setup await self.hass.async_add_executor_job(self.get_new_prayer_times) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mawaqit/init.py", line 163, in get_new_prayer_times f = open("{dir}/data/pray_time.txt".format(dir=current_dir), "r") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/config/custom_components/mawaqit/data/pray_time.txt'`

Any idea what is the fix needed?

moha-tah commented 1 month ago

@asdkjasdfla It works well on my side. Have you tried to delete the integration entry and retry to set it up?

If it doesn't work, you can delete the custom_components/mawaqit/data folder and remake the setup of the MAWAQIT entry.

Let me know your feedback when you have tested this solution. Thank you for reporting!