Snapshot API Incomplete Read Error

schasegleason
Here to help

Snapshot API Incomplete Read Error

I ran into an issue with my snapshot script when a camera was "online" dashboard showed full connectivity but I got several issues when trying to download the images from a couple of cameras. Either I got 504s (Server timed out) or more often than not a "http.client.IncompleteRead" error. 

 

Turns out there was intermittent connectivity issues but not enough to show the camera offline on the dashboard.

 

My assumption here is that even though the API returned a 202 and valid URL and that I waited 10 seconds to download from the URL, that the Snapshot was never being fully downloaded by the cloud.

 

You can work around this by catching the incomplete read, which will cause you to at least download a partial image rather than the script failing. 

 

```

try:
  data = cresponse.read()
except (http.client.IncompleteRead) as e:
  data = e.partial

```

 

 

3 REPLIES 3
PhilipDAth
Kind of a big deal
Kind of a big deal

The later 4.x firmware versions help a lot with the issue as well.

Thanks @PhilipDAth have you had this or similar issues? 

Have you seen 4.4 improve the URL delay at all? 

I have had regular issues with the snapshot API not returning images.  Sometimes it never does.

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.