adafruit / Adafruit_CircuitPython_PyPortal

CircuitPython driver for Adafruit PyPortal.
MIT License
45 stars 56 forks source link

Problems with adafruit.io image conversion calls (no response and no timeout, short data) #22

Closed mikerenfro closed 4 years ago

mikerenfro commented 5 years ago

@dhalbert requested that I add this here. I'm experiencing intermittent hangs on my office door sign code, and at least one of those hangs happened while communicating with the adafruit.io image conversion service. The PyPortal never showed any evidence of a response, and no timeouts were triggered.

A second issue with the conversion service has symptoms of the fetch() call not downloading all the BMP data. The content-length header is correct, but only part of the data is received and written to the SD card.

kevinjwalters commented 5 years ago

What's size of bmp file for the second issue you mentioned? I've had a correct size file but with some sort of corruption of image data or bmp format with PyPortal and the standard NASA Image viewer: https://forums.adafruit.com/viewtopic.php?f=60&t=151923

mikerenfro commented 5 years ago

320x240 if it went through the adafruit.io conversion service. 297x122 for the original PNG (or BMP, if I was doing my own conversion).

kevinjwalters commented 5 years ago

Apologies, I meant file size! I was curious if the file was same as HTTP Content-Length.

And it sounds like you are using an external SD card in the slot on the side?

mikerenfro commented 5 years ago

Not certain when the file was coming from adafruit.io. When I had the converted BMP on one of my own servers, Content-Length always matched the file size. But at times, the PyPortal would stop downloading before Content-Length had been reached.

And yes, I've been using the SD card slot the whole time.

kattni commented 4 years ago

This appears to be resolved by #23