colin-guyon / py-bluetooth-utils

Python module containing bluetooth utility functions, in particular for easy BLE scanning and advertising
MIT License
73 stars 20 forks source link

AttributeError: module 'socket' has no attribute 'AF_BLUETOOTH' #6

Open rjblake opened 3 years ago

rjblake commented 3 years ago

Any idea how to fix this? I can't seem to determine what is missing to get it to work.

pi@raspi:~/py-bluetooth-utils $ python3.9 example_ble_scan.py Traceback (most recent call last): File "/home/pi/py-bluetooth-utils/example_ble_scan.py", line 13, in toggle_device(dev_id, True) File "/home/pi/py-bluetooth-utils/bluetooth_utils.py", line 88, in toggle_device hci_sock = socket.socket(socket.AF_BLUETOOTH, AttributeError: module 'socket' has no attribute 'AF_BLUETOOTH'

ZHCSOFT commented 1 year ago

Use system-provided python. Do not use python installed via conda