Skip to content

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 13, 2021

Before

2021-10-12 23:01:57 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session

After

2021-10-12 23:01:57 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session:   File "/Users/bdraco/home-assistant/venv/bin/hass", line 33, in <module>
    sys.exit(load_entry_point('homeassistant', 'console_scripts', 'hass')())
  File "/Users/bdraco/home-assistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
  File "/Users/bdraco/home-assistant/homeassistant/runner.py", line 122, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1882, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 191, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data, init_done)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 270, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/Users/bdraco/home-assistant/homeassistant/components/harmony/config_flow.py", line 103, in async_step_ssdp
    await connector._get_remote_id()
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 105, in _get_remote_id
    response = await self._retrieve_hub_info()
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 427, in _retrieve_hub_info
    response = await self.hub_post(url, json_request, headers)
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 322, in hub_post
    async with self._session.post(
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 96, in _session
    self._aiohttp_session = aiohttp.ClientSession(connector=conn,

Breaking change

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

Before
```
2021-10-12 23:01:57 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
```

After
```
2021-10-12 23:01:57 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session:   File "/Users/bdraco/home-assistant/venv/bin/hass", line 33, in <module>
    sys.exit(load_entry_point('homeassistant', 'console_scripts', 'hass')())
  File "/Users/bdraco/home-assistant/homeassistant/__main__.py", line 318, in main
    exit_code = runner.run(runtime_conf)
  File "/Users/bdraco/home-assistant/homeassistant/runner.py", line 122, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1882, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 191, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data, init_done)
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 270, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/Users/bdraco/home-assistant/homeassistant/components/harmony/config_flow.py", line 103, in async_step_ssdp
    await connector._get_remote_id()
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 105, in _get_remote_id
    response = await self._retrieve_hub_info()
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 427, in _retrieve_hub_info
    response = await self.hub_post(url, json_request, headers)
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 322, in hub_post
    async with self._session.post(
  File "/Users/bdraco/home-assistant/venv/lib/python3.9/site-packages/aioharmony/hubconnector_websocket.py", line 96, in _session
    self._aiohttp_session = aiohttp.ClientSession(connector=conn,

```
Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a lot more helpful! :)

@bdraco bdraco marked this pull request as ready for review October 18, 2021 21:07
@bdraco bdraco requested a review from a team as a code owner October 18, 2021 21:07
@balloob balloob merged commit 6576225 into home-assistant:dev Oct 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants