首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OSError on PyBluez 0.22

OSError on PyBluez 0.22
EN

Stack Overflow用户
提问于 2018-04-18 21:05:48
回答 1查看 2.4K关注 0票数 0

在Windows10和Python3.6上运行PyBluez,每次调用bluetooth.discover_devices()函数时都会得到OSError。

到目前为止,这些代码仅由3行组成:

代码语言:javascript
复制
import bluetooth

print "Searching for devices... \n"
nearby_devices = bluetooth.discover_devices()

控制台然后给出:

代码语言:javascript
复制
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,这应该是一个简单的测试程序.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-04-18 21:14:42

这是因为PyBluez只对GNU/Linux和Windows提供了保证。您正在尝试在Win10上使用Win10。

如本问题所述,您可以尝试在USB3.0端口上插入蓝牙设备。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49909005

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档