#1 Error setting up entry for hacs

Закриті
2 роки тому відкрито ddmytriw · 15 коментарів
ddmytriw відкоментовано 2 роки тому

This error originated from a custom integration.

Logger: homeassistant.config_entries Source: custom_components/hacs/tasks/setup_frontend.py:6 Integration: HACS (documentation, issues) First occurred: 21:54:58 (2 occurrences) Last logged: 21:59:05

Error setting up entry for hacs Traceback (most recent call last): File "/snap/home-assistant-snap/423/lib/python3.8/site-packages/homeassistant/config_entries.py", line 304, in async_setup

result = await component.async_setup_entry(hass, self)  # type: ignore

File "/var/snap/home-assistant-snap/423/custom_components/hacs/init.py", line 39, in async_setup_entry

return await hacs_ui_setup(hass, config_entry)

File "/var/snap/home-assistant-snap/423/custom_components/hacs/operational/setup.py", line 94, in async_setup_entry

await _async_common_setup(hass)

File "/var/snap/home-assistant-snap/423/custom_components/hacs/operational/setup.py", line 50, in _async_common_setup

await hacs.tasks.async_load()

File "/var/snap/home-assistant-snap/423/custom_components/hacs/tasks/manager.py", line 43, in async_load

await asyncio.gather(*[_load_module(task) for task in task_modules])

File "/var/snap/home-assistant-snap/423/custom_components/hacs/tasks/manager.py", line 39, in _load_module

task_module = import_module(f"{__package__}.{module}")

File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/var/snap/home-assistant-snap/423/custom_components/hacs/tasks/setup_frontend.py", line 6, in

from ..hacs_frontend import locate_dir

ModuleNotFoundError: No module named 'custom_components.hacs.hacs_frontend'

This error originated from a custom integration. Logger: homeassistant.config_entries Source: custom_components/hacs/tasks/setup_frontend.py:6 Integration: HACS (documentation, issues) First occurred: 21:54:58 (2 occurrences) Last logged: 21:59:05 Error setting up entry for hacs Traceback (most recent call last): File "/snap/home-assistant-snap/423/lib/python3.8/site-packages/homeassistant/config_entries.py", line 304, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/var/snap/home-assistant-snap/423/custom_components/hacs/__init__.py", line 39, in async_setup_entry return await hacs_ui_setup(hass, config_entry) File "/var/snap/home-assistant-snap/423/custom_components/hacs/operational/setup.py", line 94, in async_setup_entry await _async_common_setup(hass) File "/var/snap/home-assistant-snap/423/custom_components/hacs/operational/setup.py", line 50, in _async_common_setup await hacs.tasks.async_load() File "/var/snap/home-assistant-snap/423/custom_components/hacs/tasks/manager.py", line 43, in async_load await asyncio.gather(*[_load_module(task) for task in task_modules]) File "/var/snap/home-assistant-snap/423/custom_components/hacs/tasks/manager.py", line 39, in _load_module task_module = import_module(f"{__package__}.{module}") File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 848, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/var/snap/home-assistant-snap/423/custom_components/hacs/tasks/setup_frontend.py", line 6, in <module> from ..hacs_frontend import locate_dir ModuleNotFoundError: No module named 'custom_components.hacs.hacs_frontend'
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

Hi,

How did you install HACS?

Did it work before, but then stopped working?

Which HA version are you on?

Hi, How did you install HACS? Did it work before, but then stopped working? Which HA version are you on?
ddmytriw відкоментовано 2 роки тому
Автор

I installed using $ snap install home-assistant-hacs. It's my first time trying to get it working. The install and connections seemed fine and adding the HACS integration goes fine but it completes with a "Fail to setup Check the logs" message. The log has the callstack I posted above. It is Home Assistant version 2021.10.7. There is also the following error which comes later:

Logger: homeassistant.components.system_health Source: custom_components/hacs/system_health.py:21 Integration: System Health (documentation, issues) First occurred: 18:20:41 (1 occurrences) Last logged: 18:20:41

Error fetching info Traceback (most recent call last): File "/snap/home-assistant-snap/423/lib/python3.8/site-packages/homeassistant/components/system_health/init.py", line 68, in get_integration_info

data = await registration.info_callback(hass)

File "/var/snap/home-assistant-snap/423/custom_components/hacs/system_health.py", line 21, in system_health_info

hacs: HacsBase = hass.data[DOMAIN]

KeyError: 'hacs'

I installed using $ snap install home-assistant-hacs. It's my first time trying to get it working. The install and connections seemed fine and adding the HACS integration goes fine but it completes with a "Fail to setup Check the logs" message. The log has the callstack I posted above. It is Home Assistant version 2021.10.7. There is also the following error which comes later: Logger: homeassistant.components.system_health Source: custom_components/hacs/system_health.py:21 Integration: System Health (documentation, issues) First occurred: 18:20:41 (1 occurrences) Last logged: 18:20:41 Error fetching info Traceback (most recent call last): File "/snap/home-assistant-snap/423/lib/python3.8/site-packages/homeassistant/components/system_health/__init__.py", line 68, in get_integration_info data = await registration.info_callback(hass) File "/var/snap/home-assistant-snap/423/custom_components/hacs/system_health.py", line 21, in system_health_info hacs: HacsBase = hass.data[DOMAIN] KeyError: 'hacs'
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

Can you give me the output of:

sudo snap connections home-assistant-hacs

and

ls -al /var/snap/home-assistant-snap/current/custom_components/

Thanks!

Can you give me the output of: ``` sudo snap connections home-assistant-hacs ``` and ``` ls -al /var/snap/home-assistant-snap/current/custom_components/ ``` Thanks!
ddmytriw відкоментовано 2 роки тому
Автор

$ sudo snap connections home-assistant-hacs

Interface Plug Slot Notes content[components] home-assistant-hacs:components home-assistant-snap:components -

and

$ ls -al /var/snap/home-assistant-snap/current/custom_components/

total 12

drwxr-xr-x 3 root root 4096 Nov 22 21:21 .

drwxr-xr-x 8 root root 4096 Nov 25 14:20 ..

drwxr-xr-x 13 root root 4096 Nov 22 21:23 hacs

Thanks for looking into this for me btw!

$ sudo snap connections home-assistant-hacs Interface Plug Slot Notes content[components] home-assistant-hacs:components home-assistant-snap:components - and $ ls -al /var/snap/home-assistant-snap/current/custom_components/ total 12 drwxr-xr-x 3 root root 4096 Nov 22 21:21 . drwxr-xr-x 8 root root 4096 Nov 25 14:20 .. drwxr-xr-x 13 root root 4096 Nov 22 21:23 hacs Thanks for looking into this for me btw!
paul відкоментовано 2 роки тому

Hi all, Same error here :(

And exactly the same results for the two commands (except the directory date creation of course).

Any update ? :)

Thank you

Hi all, Same error here :( And exactly the same results for the two commands (except the directory date creation of course). Any update ? :) Thank you
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

Hi,

Sorry, I've been busy with work lately. I'll look into this on Tuesday, possibly before.

Sorry for the inconveniences it have caused. I think you also should be able do dump the latest HACS from their website in the custom_component dir.

This package just do that.

Hi, Sorry, I've been busy with work lately. I'll look into this on Tuesday, possibly before. Sorry for the inconveniences it have caused. I think you also should be able do dump the latest HACS from their website in the `custom_component` dir. This package just do that.
paul відкоментовано 2 роки тому

Hi, No hurry, I did the copy of HACS manually like you proposed and it works just fine. So, for me, it is ok ;) Thank you. Have a nice week.

Hi, No hurry, I did the copy of HACS manually like you proposed and it works just fine. So, for me, it is ok ;) Thank you. Have a nice week.
ludrao відкоментовано 2 роки тому

I have the same issue. Out of curiosity @paul how did you manually copy hacs? Thx

I have the same issue. Out of curiosity @paul how did you manually copy hacs? Thx
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

Install it as described as on their website, but in directory:

/var/snap/home-assistant-snap/current/custom_components

The directory might differ depending on your OS, so if this path (/var/snap/home-assistant-snap/) doesn't exist, you'll have to log into the shell with

sudo snap run --shell home-assistant-snap

And check what is set in the environment variable SNAP_DATA, e.g

echo $SNAP_DATA

Then you just exit the shell when you know where your configuration files lives.

Install it as described as on their website, but in directory: ``` /var/snap/home-assistant-snap/current/custom_components ``` The directory might differ depending on your OS, so if this path (`/var/snap/home-assistant-snap/`) doesn't exist, you'll have to log into the shell with ``` sudo snap run --shell home-assistant-snap ``` And check what is set in the environment variable `SNAP_DATA`, e.g ``` echo $SNAP_DATA ``` Then you just `exit` the shell when you know where your configuration files lives.
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

PS! Then after you have downloaded HACS and dumped the file in the correct directory, restart HA with

sudo snap restart home-assistant-snap
PS! Then after you have downloaded HACS and dumped the file in the correct directory, restart HA with ``` sudo snap restart home-assistant-snap ```
ludrao відкоментовано 2 роки тому

It worked, thx. After I had the GitHub rate limit issue but it resolved itself after a while :)

It worked, thx. After I had the GitHub rate limit issue but it resolved itself after a while :)
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

Great!

Great!
GrayFarkas відкоментовано 2 роки тому

Hi All!

I have the same issue. Yesterday I installed the HA with 'sudo snap install home-assitnant-snap' and after that I install the HASC with the 'sudo snap install home-assitnant-hacs'.

Now in my HA webUI I have the same error log like the original one from ddmytriw.

I tried to copy manualy the HACS with the 'wget -O - https://get.hacs.xyz | bash -' but in my case the issue is still present.

Pleas let me know what can I do to solve this problem.

Hi All! I have the same issue. Yesterday I installed the HA with 'sudo snap install home-assitnant-snap' and after that I install the HASC with the 'sudo snap install home-assitnant-hacs'. Now in my HA webUI I have the same error log like the original one from ddmytriw. I tried to copy manualy the HACS with the 'wget -O - https://get.hacs.xyz | bash -' but in my case the issue is still present. Pleas let me know what can I do to solve this problem.
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

Hi. Make sure you have deleted the home-assistan-hacs package with

sudo snap remove --purge home-assistan-hacs

and the custom_components/hacs folder with in your configuration directory.

Now change directory to the configuration dir (see my post above regarding finding this directory) and run the command you just posted.

When that has completed restart HA with sudo snap restart home-assistant-snap and follow the logs sudo snap logs home-assistant-snap -f.

Now, when everything is started, you can go into integrations and add HACS.

Hi. Make sure you have deleted the `home-assistan-hacs` package with ``` sudo snap remove --purge home-assistan-hacs ``` and the `custom_components/hacs` folder with in your configuration directory. Now change directory to the configuration dir (see my post above regarding finding this directory) and run the command you just posted. When that has completed restart HA with `sudo snap restart home-assistant-snap` and follow the logs `sudo snap logs home-assistant-snap -f`. Now, when everything is started, you can go into integrations and add HACS.
Joachim Marthinsen Giæver відкоментовано 2 роки тому
Власник

This is now fixed.

This is now fixed.
Підпишіться щоб приєднатися до обговорення.
Без Мітки
Етап відсутній
Немає відповідального
5 учасників
Завантажується...
Скасувати
Зберегти
Тут ще немає жодного вмісту.