mbuchber / ha_heliotherm

Home Assistant Custom Component for Heliotherm Heatpumps
14 stars 5 forks source link

failed to load integration after HA update #13

Closed partach closed 11 months ago

partach commented 1 year ago

Logger: homeassistant.setup Source: custom_components/ha_heliotherm/init.py:13 Integration: HaHeliotherm (documentation, issues) First occurred: 10:49:01 (1 occurrences) Last logged: 10:49:01

Setup failed for custom integration ha_heliotherm: Unable to import component: cannot import name 'make_byte_string' from 'pymodbus.utilities' (/usr/local/lib/python3.11/site-packages/pymodbus/utilities.py) 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 "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/ha_heliotherm/init.py", line 13, in from pymodbus.payload import BinaryPayloadDecoder File "/usr/local/lib/python3.11/site-packages/pymodbus/payload.py", line 13, in from pymodbus.utilities import ( ImportError: cannot import name 'make_byte_string' from 'pymodbus.utilities' (/usr/local/lib/python3.11/site-packages/pymodbus/utilities.py)

partach commented 1 year ago

Managed to fix it myself. Had to redownload via HACs. That seems to solve it...? go to: HACS --> ha_heliotherm --> 3 dots menu right top --> redownload. Then restart HA and presto

partach commented 1 year ago

intermittently this error returns when restarting / updating HA. Any idea what it could be?

mbuchber commented 1 year ago

Must be a versioning issue with the pymodbus library, which changed in the newer versions pretty much - maybe you have a conflicting integration installed that is using the older version of pymodbus?

partach commented 1 year ago

https://github.com/home-assistant/core/issues/96521 seems related?

mbuchber commented 1 year ago

I updated the pymodbus library to 3.3.1 - hopfully it works now, please confirm if possible ;)

partach commented 1 year ago

Yes it worked! till yesterday :( Update to the latest version of HA: Home Assistant 2023.9.1 Supervisor 2023.08.3 Operating System 10.5 Frontend 20230908.0 - latest

Setup failed for custom integration ha_heliotherm: Unable to import component: Exception importing custom_components.ha_heliotherm 9 September 2023 at 23:37:45 – (ERROR) loader.py Unexpected exception importing component custom_components.ha_heliotherm 9 September 2023 at 23:37:45 – (ERROR) HaHeliotherm (custom integration)

Not sure if it could be related though. But probably original ticket can be marked closed and above is then maybe a new ticket. Please let me know how you want to proceed