Closed windextor22 closed 2 years ago
Sorry for the delay in responding. I haven't really been looking at GitHub due to the holidays.
This is not a threading error, simply is an error that occurs within a threaded method.
It is unable to locate the image for the UI due to an incorrect path due to you launching the program from an unexpected directory.
1.) Reinstall with the patched version:
wget -q https://raw.githubusercontent.com/eat-sleep-code/camera/master/install-camera.sh -O ~/install-camera.sh
sudo chmod +x ~/install-camera.sh && ~/install-camera.sh
2.) Launch the application simply by executing camera
from the device itself (not from an SSH terminal).
I am getting the following threading error when trying to run the camera.py program. how can i get this resolved.
`TERM environment variable not set. stty: 'standard input': Inappropriate ioctl for device Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/home/pi/camera/camera.py", line 411, in createControls onScreen.create(running, statusDictionary, buttonDictionary) File "/home/pi/camera/controls.py", line 108, in create image = Image.open(os.path.join(currentDirectory, 'images/capture-video.png')) File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2634, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/camera/camera/images/capture-video.png'
Traceback (most recent call last): File "/home/pi/camera/camera.py", line 420, in
echoOff()
File "/home/pi/camera/camera.py", line 114, in echoOff
subprocess.run(['stty', '-echo'], check=True)
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['stty', '-echo']' returned non-zero exit status 1.'