OSError: Failed to write requested bytes!

The camera works with the helloworld_1.py. Now I want to snap then save images. I added this code, but get the above message:

img = sensor.snapshot()         # Take a picture and return the image.
file_name = "test.bmp"

The image displays in the IDE, so the image is coming over USB serial, but does image.save() save locally or on my Mac? Since the full path on my Mac as well as paths like “~/” aren’t working I assume it’s trying to save locally. I would think that should work.

Note, if I add (roi=Auto) I get the error “NameError: name ‘Auto’ is not defined.”

Any ideas?

You need an SD card with your camera. The internal flash drive is only 96kb which can’t handle an image.

As for the roi=Auto, that just means the default ROI is the whole image. If you want to save something smaller pass an ROI rectangle tuple (x,y,w,h).