Hi,
I, very rarely, get this error when I run my image classification application on Portenta LoRa Vision Shield, but whenever I do it causes trouble in field application:
Traceback (most recent call last):
File "<stdin>", line 131, in <module>
File "<stdin>", line 129, in invoke_model
File "ml/model.py", line 36, in __init__
OSError: [Errno 5] EIO
My application uses several modules like RTC and a motor driver, but I think this error is independent of those. Rudimentarily, I can deduce that the issue is in the __init__ of ml/model.py. My model is invoked in the following way, which is pretty standard:
def invoke_model():
return ml.Model("model/trained.tflite", load_to_fb=uos.stat('model/trained.tflite')[6] > (gc.mem_free() - (64*1024)))
net = invoke_model()
Based on other posts on this forum, I believe the EIO error refers to failure in communicating with an I2C/SPI device(??). Could this be the camera in my case? Iām keen to look at the model.py script, but not sure if I can trace the lines to whatās available in this folder. Am I looking at the right file here?
Is there any measure I can take to minimise this errorās occurrence?
PC