I am installing PrivateEyePi on Raspberry 3b with Raspian Buster installed. I ran into problems when I ran 'python alarm.py' to test the installation and got the error message
Traceback (most recent call last):
File "alarm.py", line 28, in <module>
import urllib.request, urllib.error, urllib.parse
ImportError: No module named request
This was due to having two versions of Python on the Pi and the default version was Python 2.
$ python --version
Python 2.7.16
$ python3 --version
Python 3.7.3
I ran the command:
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
This corrected the problem
$ python --version
Python 3.7.3
$ python3 --version
Python 3.7.3
NOW when I run
'python alarm.py' to test the installationI get the error
Traceback (most recent call last):
File "alarm.py", line 223, in <module>
main()
File "alarm.py", line 205, in main
BuildGPIOList()
File "alarm.py", line 49, in BuildGPIOList
RecordSet = GetDataFromHost(2,[0])
File "/home/pi/pep/alarmfunctionsr.py", line 325, in GetDataFromHost
l = find_all(temp,"/n");
File "/home/pi/pep/alarmfunctionsr.py", line 49, in find_all
start = a_str.find(sub, start)
TypeError: argument should be integer or bytes-like object, not 'str'
Can you help me with this please ?