pygattlib icon indicating copy to clipboard operation
pygattlib copied to clipboard

Boost.Python.ArgumentError

Open Schefre35 opened this issue 10 months ago • 1 comments

The provided example in the docs does not work. It shows the following error message:

Traceback (most recent call last): File "/home/user/Documents/Python/ASHA/test.py", line 4, in <module> devices = service.discover(timeout=5) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Boost.Python.ArgumentError: Python argument types in DiscoveryService.discover(DiscoveryService) did not match C++ signature: discover(DiscoveryService {lvalue}, int)

The example:

`from gattlib import DiscoveryService

service = DiscoveryService("hci0") devices = service.discover(timeout=5)

for address, name in devices.items(): print("name: {}, address: {}".format(name, address))`

Schefre35 avatar Apr 03 '24 16:04 Schefre35

Hi @Schefre35!

I think that you are using the old (and deprecated) version of pygattlib, which are the C++ bindings. I deprecated that version in favour of the new one, based on DBus. Should it be suitable for you to test the dbus branch and see if it works?

Thanks!

oscaracena avatar Apr 04 '24 08:04 oscaracena