AttributeError: attribute '__doc__' of 'instancemethod' objects is not writable
Opened this issue · 12 comments
Hi,
Sometimes I get this error. Could you please help me to understand this?
Hi.
I've same issue while starting python BeaconScanner.py
Any idea how to solve?
Same issue here.
@singaCapital Please advice on the issue. Many thanks
I've tried with sudo and it's working fine
@KLIS-IT thanks for your help anyways. Unfortunately I haven't solved this yet. All Beacon Libraries for Raspberry pi seems to be generally poorly documented. I ended up using beacon tools from citrus but the documentation is... mediocre at best. I had to reverse engineer the whole thing. Will contribute better documentations after I understand how this stuff works. Many thanks anyways.
try to run sudo python3 BeaconScanner.py
I get this error when running with python2 but not with python3, though when I do get the program to run it doesn't seem to detect any beacons, which might be a different issue as I am running on a raspberry pi 4?
I get this on a Pi Zero W
Rasbean Lite
This is how I solved the problem; Change default Python and pip to 3
Note: pip --version takes a long time to show the result
python --version && pip --version
sudo python --version && sudo pip --version
sudo apt-get update && sudo apt-get install python3-pip python3-dev ipython3
sudo update-alternatives --install
python --version && pip --version
sudo python --version && sudo pip --version
sudo pip install pybluez
sudo python BeaconScanner.py
I needed to use Python 2 and managed to solve this problem by installing pybluez version 0.22 as suggested in https://stackoverflow.com/questions/59898391/getting-error-when-i-try-to-import-bluetooth-on-python2-7 using:
sudo pip install pybluez=='0.22'
Don't forget to run the program as root:
sudo python program.py
using python3 and install the packages necessaries with pip3 worked for me (also with sudo)
sudo
seems not a perfect workaround as it grants too many privileges, instead I prefer to work this around using Linux capabilities but not sure what capability I should set. I got the _bluetooth.error: (1, 'Operation not permitted')
with Python 3 first and managed to sort it out using the ambient
capability. The __doc__
issue only occurs with Python 2 (conda Python2 env) and I not sure if this could be fixed using capabilities.