-
Notifications
You must be signed in to change notification settings - Fork 55
Description
If wget() in PortalBase (https://github.com/adafruit/Adafruit_CircuitPython_PortalBase/blob/7a3277af2efb804c7ecf82d8bc87eb95c22dee2e/adafruit_portalbase/network.py#L319) gets some kind of HTTP error, it will raise adafruit_portalbase.network.HttpError, which is a subclass of Exception`.
This exception is not handled when wget() is called here:
Adafruit_CircuitPython_PyPortal/adafruit_pyportal/network.py
Lines 191 to 196 in a14d41b
| self.wget(image_url, filename, chunk_size=chunk_size) | |
| except OSError as error: | |
| raise OSError( | |
| """\n\nNo writable filesystem found for saving datastream. Insert an SD card or set internal filesystem to be unsafe by setting 'disable_concurrent_write_protection' in the mount options in boot.py""" # pylint: disable=line-too-long | |
| ) from error | |
| except RuntimeError as error: |
A scenario where this happened is described in the forums here: the Cleveland Museum of Art may return image URL's that return 404's. These cause the image converter service to return a 422.
I'm thinking that maybe PortalBase should return an easier-to-catch exception, or PyPortal should catch that HttpError and turn it into something else.