Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after updating to latest version #67

Open
asdkjasdfla opened this issue Jul 23, 2024 · 1 comment
Open

Error after updating to latest version #67

asdkjasdfla opened this issue Jul 23, 2024 · 1 comment

Comments

@asdkjasdfla
Copy link

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
Copy link
Collaborator

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants