thomasloven / hass-fontawesome

🔹 Use icons from fontawesome in home-assistant
Other
288 stars 53 forks source link

Setup failed for custom integration 'fontawesome'... #91

Open SdeGeata opened 1 month ago

SdeGeata commented 1 month ago

Hello;

I have been getting an error message on reboot of Home Assistant for about two weeks now. Reloading the integration as well as un-install & re-install doesn't solve the issue. Any idea what this could be and how to remedy the issue? Here's the error message from the logs:

`Logger: homeassistant.setup Source: setup.py:320 First occurred: 3:13:15 PM (1 occurrences) Last logged: 3:13:15 PM

Setup failed for custom integration 'fontawesome': Unable to import component: cannot import name 'StaticPathConfig' from 'homeassistant.components.http' (/usr/src/homeassistant/homeassistant/components/http/init.py) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 992, in async_get_component comp = await self.hass.async_add_import_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1052, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 131, in protected_loop_func return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/fontawesome/init.py", line 5, in from homeassistant.components.http import StaticPathConfig ImportError: cannot import name 'StaticPathConfig' from 'homeassistant.components.http' (/usr/src/homeassistant/homeassistant/components/http/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 320, in _async_setup_component component = await integration.async_get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1012, in async_get_component self._component_future.result() File "/usr/src/homeassistant/homeassistant/loader.py", line 1004, in async_get_component comp = self._get_component() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 1052, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/loop.py", line 131, in protected_loop_func return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/fontawesome/init.py", line 5, in from homeassistant.components.http import StaticPathConfig ImportError: cannot import name 'StaticPathConfig' from 'homeassistant.components.http' (/usr/src/homeassistant/homeassistant/components/http/init.py)

`

grumioRPi commented 1 month ago

I was able to resolve this issue on my instance of HA. I performed the following steps:

Icons now tested working and no error messages, hope this helps.

SdeGeata commented 1 month ago

Hello grumioRPi;

Thanks for your help. I already tried removal and reinstall via folders and config.yaml, but not the others. I’ll give it a try as per your recommendations later today.

Thanks for your help.

digas111 commented 1 month ago

I was able to resolve this issue on my instance of HA. I performed the following steps:

  • Deleted the /config/custom_components/fontawesome folder & restarted HA

  • Removed fontawesome from the Home Assistant /config/integrations/dashboard page

  • Removed fontawesome from the HACS integrations page & restarted HA

  • Reinstalled the fontawesome HACS integration & restarted HA

  • Added the fontawesome integration back on the /config/integrations/dashboard page

Icons now tested working and no error messages, hope this helps.

This did not work for me. Any other suggestions?

SdeGeata commented 1 month ago

Update: I followed the suggestions laid out by @grumioRPi, it worked for me! The only difference this time was when I installed the integration, I opted for the version two commits back (v.221) - that was at least the last one that worked surely for me. So mine is up and running now.

grumioRPi commented 1 month ago

This did not work for me. Any other suggestions?

Are you running the latest release of home assistant? This issue I found on another repository seems to be almost identical and was solved by updating to the latest version. Sorry I can't be of more help.

cws2828 commented 1 month ago

what is happen with fontawesome... my 28 icon not works i dont see why ?? image

peteh commented 2 weeks ago

I think I fixed the issue and am waiting for a merge by the maintainer.

Another option is to downgrade to 2.2.1 for now.