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

Spook Failed to set up: Error setting up entry Your homie for spook #862

Open
csidirop opened this issue Nov 17, 2024 · 0 comments
Open

Comments

@csidirop
Copy link

csidirop commented Nov 17, 2024

What version of Spook are you using?

3.1.0

What version of Home Assistant are you using?

2024.10.4 (snap installation)

The problem

A few days ago Spooky stopped working. The integration says Failed to set up: Check the logs so I checked the logs. The title Error setting up entry Your homie for spook looks similar to #842 but has a different stack trace (see logs).

I rolled back to 3.0.1, which didn't helped and I uninstalled and re-installed (to 3.1.0) which also didn't helped.

I have noticed that the log roots by a FileExistsError: FileExistsError: [Errno 17] File exists: '/var/snap/home-assistant-snap/637/custom_components/spook/integrations/spook_inverse' -> '/var/snap/home-assistant-snap/637/custom_components/spook_inverse'. And as expected the file is there, but its a sym link to /var/snap/home-assistant-snap/595/custom_components/spook/integrations/spook_inverse which don't exists anymore.
I renamed the file and reloaded the integration. Now its running again! It recreated the file which now points to /var/snap/home-assistant-snap/637/custom_components/spook/integrations/spook_inverse.

But I assume that this will happen again, if HA gets upgraded. So I think of setting the sym link to [...] /home-assistant-snap/current/custom_components/ [...] which should always work.

Anything in the logs? Paste it here!

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 10:36:14 (2 occurrences)
Last logged: 10:38:23

Error setting up entry Your homie for spook
Traceback (most recent call last):
  File "/snap/home-assistant-snap/637/lib/python3.12/site-packages/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/snap/home-assistant-snap/637/custom_components/spook/__init__.py", line 41, in async_setup_entry
    if await hass.async_add_executor_job(link_sub_integrations, hass):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/snap/home-assistant-snap/637/custom_components/spook/util.py", line 123, in link_sub_integrations
    dest.symlink_to(src)
  File "/usr/lib/python3.12/pathlib.py", line 1388, in symlink_to
    os.symlink(target, self, target_is_directory)
FileExistsError: [Errno 17] File exists: '/var/snap/home-assistant-snap/637/custom_components/spook/integrations/spook_inverse' -> '/var/snap/home-assistant-snap/637/custom_components/spook_inverse'
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

1 participant