🐛 Fix SSL: CERTIFICATE_VERIFY_FAILED error #262
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl;dr
Made the fix for
SSL: CERTIFICATE_VERIFY_FAILED
error that is encountered while downloading the dataset for each dataloader. This is fixed by passing an unverified SSL context to the urllib.request.urlopen() method.This pull request is in regards to the following issues #255, #243 and #236. I had also faced a similar issue when trying to download the datasets for the dataloader.
Reproducing the error
Ran the following Python script to load the
METRLADatasetLoader
And encountered the following error
And noticed that the tests for the dataset loaders were failing due to the similar error
The fix for the error
The fix was inspired by what PyTorch Geometric had done to bypass the
SSL: CERTIFICATE_VERIFY_FAILED
error. All they did was pass an unverified SSL context to theurllib.request.urlopen()
method call.The PyTorch Geometric code were they did that to download the datasets can be found here.
A similar solution was also mentioned in a comment inside issue #236.
And upon running the tests, we are not encountering the previous errors anymore