python-bluezero: ValueError: Cannot find a device when running cpu_temperature.py example
Running the cpu_temperature.py example, as soon as a client connects to the peripheral being advertised I get this exception (addresses obscured):
# python3 cpu_temperature.py
CPU temperature is 42.0C
b'h\x10'
Advertisement registered
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message
self._handler(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/bluezero-0.3.0-py3.7.egg/bluezero/adapter.py", line 267, in _properties_changed
device_addr=macaddr)
File "/usr/local/lib/python3.7/dist-packages/bluezero-0.3.0-py3.7.egg/bluezero/device.py", line 56, in __init__
" using adapter: " + adapter_addr)
ValueError: Cannot find a device: xx:xx:xx:xx:xx:xx using adapter: xx:xx:xx:xx:xx:xx
Platform is a RPi4 running Raspbian GNU/Linux 10 Kernel Linux raspberrypi 4.19.97-v7l+ bluez package version 5.50-1.2~deb10u1+rpt1 Python 3.7.3
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (10 by maintainers)
This fix has been merged so I’m going to close this issue
Thanks for testing. I’ll do some more testing using the adapter code when it is used as a central device to check it hasn’t broken that and then I’ll merge.