core icon indicating copy to clipboard operation
core copied to clipboard

[airzone:] cannot access local variable 'transport'

Open derekhiggins opened this issue 1 year ago • 1 comments

The problem

I'm hitting an error during home assistant startup

I'm new to HA but I don't have any airzone integrations setup, it looks like an error during some kind of auto discovery for a device on my network

What version of Home Assistant Core has the issue?

Core 2024.10.1

What was the last working version of Home Assistant Core?

Core 2024.9.?

What type of installation are you running?

Home Assistant OS

Integration causing the issue

airzone

Link to integration documentation on our website

https://www.home-assistant.io/integrations/airzone

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant
Source: components/airzone/config_flow.py:116
First occurred: 09:17:37 (1 occurrences)
Last logged: 09:17:37

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aioairzone/http.py", line 258, in request
    transport, protocol = await self.loop.create_connection(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1104, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1007, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1287, in async_init
    flow, result = await self._async_init(flow_id, handler, context, data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1322, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 520, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/airzone/config_flow.py", line 116, in async_step_dhcp
    await airzone.get_version()
  File "/usr/local/lib/python3.12/site-packages/aioairzone/localapi.py", line 610, in get_version
    res = await self.http_request(
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioairzone/localapi.py", line 275, in http_request
    return await self.http_quirks_request(method, path, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioairzone/localapi.py", line 237, in http_quirks_request
    resp = await self.http.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioairzone/http.py", line 268, in request
    transport.close()
    ^^^^^^^^^
UnboundLocalError: cannot access local variable 'transport' where it is not associated with a value

Additional information

No response

derekhiggins avatar Oct 08 '24 08:10 derekhiggins

Hey there @noltari, mind taking a look at this issue as it has been labeled with an integration (airzone) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of airzone can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign airzone Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


airzone documentation airzone source (message by IssueLinks)

home-assistant[bot] avatar Oct 08 '24 08:10 home-assistant[bot]

@home-assistant close

Noltari avatar Oct 13 '24 18:10 Noltari