jrfernandes / ontario_energy_board

Home Assistant component that installs a sensor with the current energy rate for Ontario energy companies
MIT License
41 stars 10 forks source link

Unable to import component: No module named 'hijri_converter' #32

Closed kenlasko closed 10 months ago

kenlasko commented 10 months ago

Since 2023.8.0, I get this error upon startup of HA. The integration does not function.

OS: Linux Installation type: Container using ghcr.io/home-assistant/home-assistant:stable image HA version: 2023.8.2

Setup failed for custom integration ontario_energy_board: Unable to import component: No module named 'hijri_converter'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 215, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 813, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/ontario_energy_board/__init__.py", line 8, in <module>
    from .coordinator import OntarioEnergyBoardDataUpdateCoordinator
  File "/config/custom_components/ontario_energy_board/coordinator.py", line 8, in <module>
    import holidays
  File "/config/deps/lib/python3.11/site-packages/holidays/__init__.py", line 13, in <module>
    from holidays.countries import *
  File "/config/deps/lib/python3.11/site-packages/holidays/countries/__init__.py", line 18, in <module>
    from .azerbaijan import Azerbaijan, AZ, AZE
  File "/config/deps/lib/python3.11/site-packages/holidays/countries/azerbaijan.py", line 18, in <module>
    from holidays.utils import islamic_to_gre
  File "/config/deps/lib/python3.11/site-packages/holidays/utils.py", line 20, in <module>
    from hijri_converter import convert
ModuleNotFoundError: No module named 'hijri_converter'
kenlasko commented 10 months ago

Fixed the issue by deleting the following folders and restarting HA: /config/deps/lib/python3.11/site-packages/holidays /config/deps/lib/python3.11/site-packages/holidays-0.12.dist-info