-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deceiving exception handling messages when available memory is low (below ~41k) #138
Comments
Is 41k really the minimum memory requirement for SSL to work? |
SSL does take a good amount of memory and network requests generally do. You may be able to save memory with the json_stream library: https://github.com/adafruit/Adafruit_CircuitPython_JSON_Stream/ It'll pick values out in a stream rather than creating a bunch of objects holding all of the json data. |
This is interesting, but does not really address the problem since the exception is thrown at the On a side note, your library crashes at
|
I have run into issues with using the Requests library on a Pico W while getting JSON responses from an https url. The exception messages will vary based on the amount of free memory. I have created a quick sample to test and show the behavior.
The sample just loads images into a list and prints out the JSON returned until the board runs low on memory.
Below ~41k the exceptions make it look like a certification error and has the message 'Sending request failed'
Below ~27k it just fails and gives no exception message at all.
The same result happens with
requests.get(url)
andrequests.get(url, stream=True)
.Crudely tested on:
CircuitPython 8.2.0, 8.1.0, 8.0.5, 8.0.2
Requests 1.14.1, 1.13.4, 1.12.9
Any secrets to getting this to work on low memory situations (like a pico driving a Matrix LED)?
Can we get better exception messages to indicate what is happening?
The text was updated successfully, but these errors were encountered: