Skip to content
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

SSL: CERTIFICATE_VERIFY_FAILED when loading METR-LA Dataset #265

Open
PietroLodiRizzini opened this issue Jan 24, 2024 · 2 comments
Open

Comments

@PietroLodiRizzini
Copy link

I was trying to load the METRLA dataset via the following code:

loader = METRLADatasetLoader()
dataset = loader.get_dataset(num_timesteps_in=12, num_timesteps_out=12)

but the following error arises:

---------------------------------------------------------------------------
SSLCertVerificationError                  Traceback (most recent call last)
[/usr/lib/python3.10/urllib/request.py](https://localhost:8080/#) in do_open(self, http_class, req, **http_conn_args)
   1347             try:
-> 1348                 h.request(req.get_method(), req.selector, req.data, headers,
   1349                           encode_chunked=req.has_header('Transfer-encoding'))

18 frames
SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)

During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
[/usr/lib/python3.10/urllib/request.py](https://localhost:8080/#) in do_open(self, http_class, req, **http_conn_args)
   1349                           encode_chunked=req.has_header('Transfer-encoding'))
   1350             except OSError as err: # timeout error
-> 1351                 raise URLError(err)
   1352             r = h.getresponse()
   1353         except:

URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)>
@PietroLodiRizzini PietroLodiRizzini changed the title SSL: CERTIFICATE_VERIFY_FAILED when loading METRLA Dataset SSL: CERTIFICATE_VERIFY_FAILED when loading METR-LA Dataset Jan 24, 2024
@PietroLodiRizzini
Copy link
Author

PietroLodiRizzini commented Jan 24, 2024

temporarily solved by manually downloading the zip and setting raw_data_dir in the data loader constructor, but the SSL problem for graphmining.ai persists

@Daniel-Signatur
Copy link

Adding

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

at the start of the code, also solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants