OSError: The logical drive number is invalid

OpenMV related project discussion.
RonC
Posts: 8
Joined: Wed Jun 15, 2016 5:38 pm

OSError: The logical drive number is invalid

Postby RonC » Sun Oct 16, 2016 4:15 pm

I am trying to save an image to the SD card on my OpenMV.
My PC sees the OpenMV as drive G:, but I get the error shown on the subject above.
What am I doing wrong?

Here is a code snippet:
img = sensor.snapshot()
img.save("G:\myPrograms\theImage.jpg")

Thanks,
RonC
User avatar
iabdalkader
Posts: 552
Joined: Sun May 24, 2015 3:53 pm

Re: OSError: The logical drive number is invalid

Postby iabdalkader » Sun Oct 16, 2016 5:00 pm

Hi Ron,

From the camera's perspective there's only one drive (the internal flash or micro sd) and it doesn't use letters. You can save the image as just "theImage.jpg" and it will save it to the internal flash or to micro sd if it's connected.
Last edited by iabdalkader on Sun Oct 16, 2016 5:00 pm, edited 1 time in total.
Reason: Fixed typo
RonC
Posts: 8
Joined: Wed Jun 15, 2016 5:38 pm

Re: OSError: The logical drive number is invalid

Postby RonC » Sun Oct 16, 2016 5:45 pm

Thanks "iabdalkader". It works :)

Return to “Project Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests