我在raspeberry pi 4上安装了python2.7,其中包含一个使用Bluethoth库(pybluez)的脚本,但是在导入库时脚本崩溃了。 Si我只是尝试在python2.7 shell上导入蓝牙库,我遇到了相同的错误“Attributeer:instancemethod对象的属性'doc”不可写
我无法切换到python3,我不明白为什么它不起作用,所以如果有人对此有疑问,我将不胜感激:)
代码:
Import bluetooth
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/bluetooth/__init__.py", line 282,
in <module>
"""
AtributeError: attribute '__doc__' of 'instancemethod' objects is not writable
谢谢
我有同样的问题,并通过使用thisinit.py修复了它
在第8行附近的某个地方,它显示“version”,我使用的“old”init.py是0.23,工作的是0.22。 顺便说一句,我使用pip安装获得了0.23
相关问题 更多 >
编程相关推荐