Exception: Could not find the file

Hi, I’ve tried to do this project Smart HVAC System with an Arduino Nicla Vision.
My project ID is 287178.
I have no idea why could not find the file. Can someone tell me why and lead me?
Thanks

Hi @RogYCH,

What file was not found? What program were you running when you encountered this error? Can you copy and paste the entire error message? That will help us troubleshoot the problem.

1 Like

This is the message that popped out when I clicked start below.

Hi @RogYCH,

Your code looks different from my example code when I deploy an OpenMV example from an object detection project:

net = None
labels = None
min_confidence = 0.5

try:
    # load the model, alloc the model file on the heap if we have at least 64K free after loading
    net = tf.load("trained.tflite", load_to_fb=uos.stat('trained.tflite')[6] > (gc.mem_free() - (64*1024)))
except Exception as e:
    raise Exception('Failed to load "trained.tflite", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')

try:
    labels = [line.rstrip('\n') for line in open("labels.txt")]
except Exception as e:
    raise Exception('Failed to load "labels.txt", did you copy the .tflite and labels.txt file onto the mass-storage device? (' + str(e) + ')')

colors = [ # Add more colors if you are detecting more than 7 types of classes at once.
    (255,   0,   0),
    (  0, 255,   0),
    (255, 255,   0),
    (  0,   0, 255),
    (255,   0, 255),
    (  0, 255, 255),
    (255, 255, 255),
]

Make sure you copy trained.tflite and labels.txt over to your OpenMV’s mass storage drive (e.g. SD card) prior to running the code. Those filenames should match the filenames in your code.