-
Notifications
You must be signed in to change notification settings - Fork 10
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
ModuleNotFoundError (pymodbus error) #55
Comments
The following worked for me as far as pulling in DATA again, but logs indicate that it will not work on later releases. Temp Fix: Original Line 12 ------------ Original Line 64 ------------ |
I did some investigating and found that there is once again a breaking change in pymodbus as of v3.4.7 which is now the default in HA 2025.1. As a result this integration is now broken. Would love to see a pull request which properly resolves this issue but if I do not I will try and get some time reserved to fix it. In the meantime I can only advise people to refrain from upgrading to any 2025 release until a reasonable solution can be found. |
Per pbix#55 (comment), PR to implement these changes
thanks, this did solve the issue |
I created #57 to implement @blassond's changes. Testing this worked for me on 2015.1.2. |
Using Home Assistant via Docker with core version just updated to 2025.1.0.dev202412200230 and getting the following on start up.
Logger: homeassistant.setup
Source: setup.py:334
First occurred: 10:49:36 PM (1 occurrences)
Last logged: 10:49:36 PM
Setup failed for custom integration 'solark_modbus': Unable to import component: No module named 'pymodbus.register_read_message'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1034, in async_get_component
self._component_future.result()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1014, in async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self._get_component, True
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1074, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.13/importlib/init.py", line 88, 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 1026, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/solark_modbus/init.py", line 12, in
from .hub import SolArkModbusHub
File "/config/custom_components/solark_modbus/hub.py", line 12, in
from pymodbus.register_read_message import ReadHoldingRegistersResponse
ModuleNotFoundError: No module named 'pymodbus.register_read_message'
The text was updated successfully, but these errors were encountered: