问题
I just tried to implement bluetooth from Python in PyCharm, using PyBluez. I am stuck with this particular error. I tried to search this error but could not find it. Can anybody help ?
This is my code
>>> 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:
I had the same error and managed to fix it.
The Bluetooth Radio device was disabled on my laptop.
I opened Device Manager, selected the device, and enabled it.
Now my output is:
>>> from bluetooth import discover_devices
>>> discover_devices()
['2C:4A:05:96:27:01']
来源:https://stackoverflow.com/questions/32389334/discovering-bluetooth-devices-ioerror-the-rpc-server-is-unavailable