Traceback (most recent call last):
File "classify_picamera.py", line 96, in <module> main()
File "classify_picamera.py", line 68, in main labels = load_labels(args.labels)
File "classify_picamera.py", line 33, in load_labels with open(path, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/labels_mobilenet_quant_v1_224.txt'
I am feeling like I missed a step in the installation or maybe the instructions are not complete?
Has anyone run across these kinds of error or has gotten these errors?
@Sean_Worcester have you run the download.sh file as described in the documentation? This script should have downloaded the labels_mobilenet_quant_v1_224.txt and mobilenet_v1_1.0_224_quant.tflite files into the tmp directory.
When you open a file with the name “filename.ext”; you are telling the open() function that your file is in the current working directory . This is called a relative path.
file = open('filename.ext') //relative path
In the above code, you are not giving the full path to a file to the open() function, just its name - a relative path. The error “FileNotFoundError: [Errno 2] No such file or directory” is telling you that there is no file of that name in the working directory. So, try using the exact, or absolute path.