spherov2.py
spherov2.py copied to clipboard
ValueError: badly formed hexadecimal UUID string
Hi,
I'm trying to use this library with a Sphero Bolt. I'm on macOS using python 3.10
from spherov2 import scanner
from spherov2.sphero_edu import SpheroEduAPI
toy = scanner.find_toy()
I get the following error:
Exception in callback CentralManagerDelegate.did_discover_peripheral(<CBCentralMan...x600003ff0d80>, <CBPeripheral... disconnected>, {
kCBAdvD...erLevel = 8;
}, -97)
handle: <Handle CentralManagerDelegate.did_discover_peripheral(<CBCentralMan...x600003ff0d80>, <CBPeripheral... disconnected>, {
kCBAdvD...erLevel = 8;
}, -97)>
Traceback (most recent call last):
File "/Users/richard/miniforge3/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/richard/Library/Caches/pypoetry/virtualenvs/spherov2-test-L0-TfrQP-py3.10/lib/python3.10/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 265, in did_discover_peripheral
callback(peripheral, advertisementData, RSSI)
File "/Users/richard/Library/Caches/pypoetry/virtualenvs/spherov2-test-L0-TfrQP-py3.10/lib/python3.10/site-packages/bleak/backends/corebluetooth/scanner.py", line 116, in callback
service_uuids = [
File "/Users/richard/Library/Caches/pypoetry/virtualenvs/spherov2-test-L0-TfrQP-py3.10/lib/python3.10/site-packages/bleak/backends/corebluetooth/scanner.py", line 117, in <listcomp>
cb_uuid_to_str(u) for u in a.get("kCBAdvDataServiceUUIDs", [])
File "/Users/richard/Library/Caches/pypoetry/virtualenvs/spherov2-test-L0-TfrQP-py3.10/lib/python3.10/site-packages/bleak/backends/corebluetooth/utils.py", line 19, in cb_uuid_to_str
return normalize_uuid_str(uuid.UUIDString())
File "/Users/richard/Library/Caches/pypoetry/virtualenvs/spherov2-test-L0-TfrQP-py3.10/lib/python3.10/site-packages/bleak/uuids.py", line 1167, in normalize_uuid_str
return str(UUID(uuid))
File "/Users/richard/miniforge3/lib/python3.10/uuid.py", line 177, in __init__
raise ValueError('badly formed hexadecimal UUID string')
ValueError: badly formed hexadecimal UUID string