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

Fix disconnect in the global BlueZ manager #918

Merged
merged 1 commit into from Aug 3, 2022

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Aug 2, 2022

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 253, in async_setup_entry
    await manager.async_start(
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 343, in async_start
    await self.scanner.start()  # type: ignore[no-untyped-call]
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/scanner.py", line 128, in start
    manager = await get_global_bluez_manager()
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 808, in get_global_bluez_manager
    await instance.async_init()
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 344, in async_init
    await self._bus.disconnect()
TypeError: object NoneType can't be used in 'await' expression

```
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 253, in async_setup_entry
    await manager.async_start(
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/__init__.py", line 343, in async_start
    await self.scanner.start()  # type: ignore[no-untyped-call]
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/scanner.py", line 128, in start
    manager = await get_global_bluez_manager()
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 808, in get_global_bluez_manager
    await instance.async_init()
  File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 344, in async_init
    await self._bus.disconnect()
TypeError: object NoneType can't be used in 'await' expression

```
@bdraco
Copy link
Contributor Author

bdraco commented Aug 2, 2022

Logger: bleak.backends.bluezdbus.client
Source: components/switchbot/cover.py:94
First occurred: 10:36:23 (1 occurrences)
Last logged: 10:36:23
Failed to cancel connection (/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX): 'NoneType' object has no attribute 'call'

Actually thats a different issue.... and fixed in #919

@dlech dlech merged commit 6395e7e into hbldh:develop Aug 3, 2022
@dlech
Copy link
Collaborator

dlech commented Aug 3, 2022

merged, thanks!

@dlech dlech mentioned this pull request Aug 3, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants