Python 发现蓝牙设备IOError:RPC服务器不可用

Python 发现蓝牙设备IOError:RPC服务器不可用,python,bluetooth,pybluez,Python,Bluetooth,Pybluez,我刚刚尝试在PyCharm中使用Python实现蓝牙。我被这个特别的错误缠住了。我试图搜索此错误,但找不到它。有人能帮忙吗 这是我的密码 >>> from bluetooth import discover_devices >>> nearby_devices = discover_devices() Traceback (most recent call last): File "<stdin>", line 1, in <module

我刚刚尝试在PyCharm中使用Python实现蓝牙。我被这个特别的错误缠住了。我试图搜索此错误,但找不到它。有人能帮忙吗

这是我的密码

>>> from bluetooth import discover_devices
>>> nearby_devices = discover_devices()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\bluetooth\msbt.py", line 15, in discover_devices
    devices = bt.discover_devices(duration=duration, flush_cache=flush_cache)
IOError: The RPC server is unavailable.
>>从蓝牙导入发现设备
>>>附近的_设备=发现_设备()
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“C:\Python27\lib\site packages\bluetooth\msbt.py”,第15行,在discover\u设备中
设备=bt.discover\u设备(持续时间=持续时间,刷新缓存=刷新缓存)
IOError:RPC服务器不可用。

我遇到了同样的错误,并设法修复了它

我的笔记本电脑上的蓝牙无线电设备已禁用

我打开设备管理器,选择设备并启用它

现在我的输出是:

>>> from bluetooth import discover_devices
>>> discover_devices()
['2C:4A:05:96:27:01']

我也犯了同样的错误。我签入了服务,但蓝牙支持服务没有运行(我想我很久以前就禁用了它)。我重新启动了它,但出现了另一个错误
IOError:句柄无效。
。我附近没有蓝牙设备,所以无法测试。您的电脑能够发现设备吗?