在Windows10和Python3.6上运行PyBluez,每次调用bluetooth.discover_devices()函数时都会得到OSError。
到目前为止,这些代码仅由3行组成:
import bluetooth
print "Searching for devices... \n"
nearby_devices = bluetooth.discover_devices()控制台然后给出:
Searching for devices...
Traceback (most recent call last):
File "D:\Documentos\UFSC\9ª Fase\Projeto Integrador\testeBT.py", line 9, in <module>
nearby_devices = bluetooth.discover_devices()
File "C:\Users\Thaler\AppData\Local\Programs\Python\Python36-32\lib\site-packages\bluetooth\msbt.py", line 15, in discover_devices
devices = bt.discover_devices(duration=duration, flush_cache=flush_cache)
OSError有解决办法吗?我以前从未使用过PyBluez,这应该是一个简单的测试程序.
https://stackoverflow.com/questions/49909005
复制相似问题