No module named 'dbus_fast' in Windows when import BleakClientBlueZDBus
vovagorodok opened this issue · comments
Włodzimierz Ciesielski commented
- bleak version: 0.21.1
- Python version: latest
- Operating System: Windows
- BlueZ version (
bluetoothctl -v
) in case of Linux:
Description
In workaround function:
async def acquire_mtu(client: BleakClient):
from bleak.backends.bluezdbus.client import BleakClientBlueZDBus
if type(client._backend) is not BleakClientBlueZDBus:
return
# in Linux acquire mtu should be called in order to have more than 23
await client._backend._acquire_mtu()
When import BleakClientBlueZDBus
called in Windows, following exception raised:
No module named 'dbus_fast'
Should it be fixed in bleak side or script should be changed somehow?
What I Did
N/A
Logs
N/A
David Lechner commented
The problem isn't with Bleak but rather with the code you linked. It could be fixed by wrapping the import statement in a try
block or by putting this line in an if
block so that it only runs on Linux.
Włodzimierz Ciesielski commented
Ok, thanks @dlech !
Włodzimierz Ciesielski commented