You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/jorgedso/Projects/Bluetooth_project-master/external_threads.py", line 9, in get_headsets_devices
blueClass.get_bluetooth_devices()
File "/home/jorgedso/Projects/Bluetooth_project-master/blueP.py", line 60, in get_bluetooth_devices
"name": str(obj.Get("org.bluez.Device1", "Name")),
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.InvalidArgs: No such property 'Name'
The text was updated successfully, but these errors were encountered:
Same issue on Linux Mint 20.2, but I've found a workaround. Some devices in range probably have hidden names, so you can try to change blueP#get_bluetooth_devices() to something like this:
55 bt_devices = []
56
57 for device in devices:
58 obj = self.proxyobj(bus, device, 'org.freedesktop.DBus.Properties')
59 name = 'Unknown name'
60 try:
61 name = str(obj.Get("org.bluez.Device1", "Name"))
62 except BaseException as e:
63 pass
64 bt_devices.append({
65 "name": name,
66 "address": str(obj.Get("org.bluez.Device1", "Address")),
67 "port": self.get_device_port(str(obj.Get("org.bluez.Device1", "Address")))
68 })
Environment:
Logs:
The text was updated successfully, but these errors were encountered: