-
Notifications
You must be signed in to change notification settings - Fork 548
Retry with certifi cert if curl fails to find any #2011
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
Conversation
Towards resolving #2009 This requires being able to clear the VSI cache, which will have been contaminated by previous failure.
|
|
||
| # The VSI cache will be contaminated by the previous | ||
| # failure and must be cleared before we re-try. | ||
| clear_vsi_curl_cache() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snowman2 since OS X and conda-forge builds don't need this, I've built a re-try with certifi into our wrapper around rasterio.open().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: a test
|
Thanks for taking this on. I think this will be very useful for the wheels 👍
Here are some things I thought might be worth considering/exploring (Disclaimer: I don't have the answers):
This may or may not be helpful, but here it is for reference all the same:
|
|
@snowman2 I was hoping to avoid bad surprises on OS X, which has its own SSL lib that the rasterio wheels depend on. Thanks for pointing out the PROJ situation. Since the PROJ CDN client and caching is all done very low down in C, there's no Python exception to catch and retry, right? |
Have you tested this out to see if there are any issues with this?
I haven't tested out how GDAL handles this, but the scenario where the values are |
|
When rasterio is python 3+, this also looks useful: https://docs.python.org/dev/library/ssl.html#ssl.SSLContext.load_verify_locations |
Side note just for awareness: recently dug in the GDAL code and found GDAL's PROJ Log Handler. From what I can tell, it seems likely that a GDAL exception would be raised in the case of an internal PROJ error. |
Towards resolving #2009
This requires being able to clear the VSI cache, which will have been contaminated by previous failure. And thus requires GDAL 2.2.1, but I'm going to require 2.4 because we might want to scope the cache clear to a single file.