1
我對Python很新,我試圖讓Pybluez爲我工作。PyBluez的模塊對象沒有任何屬性'discover_devices'
這是當我嘗試發現藍牙設備時會發生什麼。
import bluetooth
nearby_devices = bluetooth.discover_devices()
Traceback (most recent call last):
File "<stdin>",line1,in <module>
AttributeError: 'module' object has no attribute 'discover_devices'
我在Windows 8.1中,蟒蛇2.7.10,pybluez 0.21
太傻了,謝謝。我也將我的文件命名爲bluetooth.py。 –