WenjieDu / TSDB

a Python toolbox loads 172 public time series datasets for machine/deep learning with a single line of code. Datasets from multiple domains including healthcare, financial, power, traffic, weather, and etc.
https://pypots.com/ecosystem/#TSDB
BSD 3-Clause "New" or "Revised" License
151 stars 15 forks source link

Auth error when trying to get PhysioNet datasets #12

Closed michaelalb closed 1 year ago

michaelalb commented 1 year ago

Hey, I'm trying to get the physionet challange data like this (copied from the examples): data = tsdb.load_dataset('physionet_2012') # select the dataset you need and load it, TSDB will download, extract, and process it automatically

and I get this error,

Start downloading... Exception: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131)> Download failed. Aborting. Traceback (most recent call last): File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 1354, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "C:\Users\Lenovo\Anaconda3\lib\http\client.py", line 1256, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\Lenovo\Anaconda3\lib\http\client.py", line 1302, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\Lenovo\Anaconda3\lib\http\client.py", line 1251, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\Lenovo\Anaconda3\lib\http\client.py", line 1011, in _send_output self.send(msg) File "C:\Users\Lenovo\Anaconda3\lib\http\client.py", line 951, in send self.connect() File "C:\Users\Lenovo\Anaconda3\lib\http\client.py", line 1425, in connect self.sock = self._context.wrap_socket(self.sock, File "C:\Users\Lenovo\Anaconda3\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "C:\Users\Lenovo\Anaconda3\lib\ssl.py", line 1040, in _create self.do_handshake() File "C:\Users\Lenovo\Anaconda3\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Lenovo\Anaconda3\lib\site-packages\tsdb\data_processing.py", line 84, in _download_and_extract urllib.request.urlretrieve(url, raw_data_saving_path) File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 247, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 222, in urlopen return opener.open(url, data, timeout) File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 525, in open response = self._open(req, data) File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 502, in _call_chain result = func(*args) File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 1397, in https_open return self.do_open(http.client.HTTPSConnection, req, File "C:\Users\Lenovo\Anaconda3\lib\urllib\request.py", line 1357, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1131)> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Lenovo\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3361, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in <cell line: 1> data = tsdb.load_dataset('physionet_2012') # select the dataset you need and load it, TSDB will download, extract, and process it automatically File "C:\Users\Lenovo\Anaconda3\lib\site-packages\tsdb\data_processing.py", line 274, in load_dataset download_and_extract(dataset_name, dataset_saving_path) File "C:\Users\Lenovo\Anaconda3\lib\site-packages\tsdb\data_processing.py", line 129, in download_and_extract _download_and_extract(link, dataset_saving_path) File "C:\Users\Lenovo\Anaconda3\lib\site-packages\tsdb\data_processing.py", line 89, in _download_and_extract sys.exit() SystemExit C:\Users\Lenovo\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3369: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D. warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

WenjieDu commented 1 year ago

Hi there,

Thank you so much for your attention to TSDB! If you find TSDB helpful to your work, please star⭐️ this repository. Your star is your recognition, which can help more people notice TSDB this useful tool. It matters and is definitely a kind of contribution.

I have received your message and will respond ASAP. Thank you for your patience! 😃

Best,
Wenjie

WenjieDu commented 1 year ago

I think this is a networking error. Please check the stability of your network and whether you're using a proxy/VPN.

michaelalb commented 1 year ago

Hey @WenjieDu , thanks for the response, I've tried this with\without VPN and in three different networks (home\public\university) and always the same error.

WenjieDu commented 1 year ago

That's weird. You can try on Google Colab to see if TSDB is working well, e.g. with this tutorial.

michaelalb commented 1 year ago

I see that it does! thanks! from a google colab notebook I am able to download the data! thanks:) I guess the issue is with my computers and or networks

WenjieDu commented 1 year ago

Great! Happy to know that TSDB works for you. If it doesn't bother you, please star 🌟TSDB to make more people notice this useful tool. Thanks! 😃