Original forum post:
viewtopic.php?f=60&t=176411
Trying to load images on a Titano from the Cleveland Museum of Art demo.
I think this may be related to the Adafruit IO service which is being called to convert the images from JPG to BMP16.
Receive error code 422
- Code: Select all | TOGGLE FULL SIZE
original URL: https://openaccess-cdn.clevelandart.org/1940.672/1940.672_web.jpg
convert URL: https://io.adafruit.com/api/v2/jliu70/integrations/image-formatter?x-aio-key=secretKey&width=480&height=305&output=BMP16&url=https://openaccess-cdn.clevelandart.org/1940.672/1940.672_web.jpg
Fetching stream from https://io.adafruit.com/api/v2/jliu70/integrations/image-formatter?x-aio-key=secretKey&width=480&height=305&output=BMP16&url=https://openaccess-cdn.clevelandart.org/1940.672/1940.672_web.jpg
Traceback (most recent call last):
File "code.py", line 57, in <module>
File "code.py", line 46, in <module>
File "adafruit_pyportal.py", line 1106, in fetch
File "adafruit_pyportal.py", line 1103, in fetch
File "adafruit_pyportal.py", line 1083, in fetch
File "adafruit_pyportal.py", line 1077, in fetch
File "adafruit_pyportal.py", line 781, in wget
HttpError: Code 422: Unprocessable Entity
Code done running.
So the API call is for the "Fetching stream from ....." line.
When I attempt to call the URL directly in the browser, I receive the following:
- Code: Select all | TOGGLE FULL SIZE
{"error":"request failed - failed to load and process image"}
If I call the original URL from the Cleveland Museum of Art within the browser, it works.
- Code: Select all | TOGGLE FULL SIZE
https://openaccess-cdn.clevelandart.org/1940.672/1940.672_web.jpg
So since fetching the original Cleveland Museum of Art image image works, and that this is also affecting NASA Photo of the Day, that implies that there could be something wrong with the AIO image conversion to BMP16 service.
Not sure if someone at Adafruit can help check and see if that's the case?
Thanks!