Skip to content
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

module 'custom_components.zha_toolkit.neighbours' has no attribute 'get_routes_and_neighbours' #184

Closed
galmok opened this issue Jul 23, 2023 · 1 comment

Comments

@galmok
Copy link

galmok commented Jul 23, 2023

I was calling the service "ZHA Toolkit: get_routes_and_neighbours" but it failed with these messages in the log:

2023-07-23 09:39:22.194 INFO (MainThread) [custom_components.zha_toolkit] Running ZHA Toolkit service: <ServiceCall zha_toolkit.get_routes_and_neighbours (c:XXXXXXXXXXXXXXXXXXXXXXXXXXXX)>
2023-07-23 09:39:22.210 DEBUG (MainThread) [custom_components.zha_toolkit] module is <module 'custom_components.zha_toolkit' from '/config/custom_components/zha_toolkit/__init__.py'>
2023-07-23 09:39:22.216 DEBUG (MainThread) [custom_components.zha_toolkit.utils] Parameters '{}'
2023-07-23 09:39:22.216 DEBUG (MainThread) [custom_components.zha_toolkit.utils] Final manf 'None'
2023-07-23 09:39:22.218 DEBUG (MainThread) [custom_components.zha_toolkit] Default handler for get_routes_and_neighbours
2023-07-23 09:39:22.218 DEBUG (MainThread) [custom_components.zha_toolkit] Handler: <function command_handler_default at 0x7f5d12f880>
2023-07-23 09:39:22.218 DEBUG (MainThread) [custom_components.zha_toolkit] running default command: <ServiceCall zha_toolkit.get_routes_and_neighbours (c:XXXXXXXXXXXXXXXXXXXXXXXXXXXX)>
2023-07-23 09:39:22.219 DEBUG (MainThread) [custom_components.zha_toolkit.default] Trying to import custom_components.zha_toolkit.neighbours to call get_routes_and_neighbours
2023-07-23 09:39:22.221 DEBUG (MainThread) [custom_components.zha_toolkit] event_data {'zha_toolkit_version': 'v0.9.5', 'zigpy_version': '0.56.2', 'zigpy_rf_version': '0.11.3', 'ieee_org': None, 'ieee': 'None', 'command': 'get_routes_and_neighbours', 'command_data': None, 'start_time': '2023-07-23T07:39:22.218191+00:00', 'errors': ['AttributeError("module \'custom_components.zha_toolkit.neighbours\' has no attribute \'get_routes_and_neighbours\'")'], 'params': {'dir': 0, 'tries': 1, 'expect_reply': True, 'args': [], 'read_before_write': True, 'read_after_write': True}, 'success': False}
2023-07-23 09:39:22.222 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: module 'custom_components.zha_toolkit.neighbours' has no attribute 'get_routes_and_neighbours'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1965, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/config/custom_components/zha_toolkit/__init__.py", line 777, in toolkit_service
    raise handler_exception
  File "/config/custom_components/zha_toolkit/__init__.py", line 741, in toolkit_service
    await handler(
  File "/config/custom_components/zha_toolkit/__init__.py", line 826, in command_handler_default
    await default.default(
  File "/config/custom_components/zha_toolkit/default.py", line 38, in default
    handler = getattr(m, cmd)
              ^^^^^^^^^^^^^^^
AttributeError: module 'custom_components.zha_toolkit.neighbours' has no attribute 'get_routes_and_neighbours'
mdeweerd added a commit that referenced this issue Jul 23, 2023
Fix #183 #184 *neighbours_and_routes djustments for refactored zigpy implementation.
@mdeweerd
Copy link
Owner

Fixed in v0.9.6 - currently a pre-release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants