You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTTPError Traceback (most recent call last)
Cell In[2], line 10
4 os.makedirs(SAVE_PATH)
7 # Load Data, an array of SMILES for drug, an array of Amino Acid Sequence for Target and an array of binding values/0-1 label.
8 # e.g. ['Cc1ccc(CNS(=O)(=O)c2ccc(s2)S(N)(=O)=O)cc1', ...], ['MSHHWGYGKHNGPEHWHKDFPIAKGERQSPVDIDTH...', ...], [0.46, 0.49, ...]
9 # In this example, BindingDB with Kd binding score is used.
---> 10 X_drug, X_target, y = process_BindingDB(download_BindingDB(SAVE_PATH),
11 y = 'Kd',
12 binary = False,
13 convert_to_log = True)
15 # Type in the encoding names for drug/protein.
16 drug_encoding, target_encoding = 'CNN', 'Transformer'
File ~\anaconda3\Lib\site-packages\DeepPurpose\dataset.py:174, in download_BindingDB(path)
171 os.makedirs(path)
173 url = 'https://www.bindingdb.org/bind/downloads/BindingDB_All_2021m5.tsv.zip'
--> 174 saved_path = wget.download(url, path)
176 print('Beginning to extract zip file...')
177 with ZipFile(saved_path, 'r') as zip:
File ~\anaconda3\Lib\urllib\request.py:241, in urlretrieve(url, filename, reporthook, data)
224 """
225 Retrieve a URL into a temporary location on disk.
226
(...)
237 data file as well as the resulting HTTPMessage object.
238 """
239 url_type, path = _splittype(url)
--> 241 with contextlib.closing(urlopen(url, data)) as fp:
242 headers = fp.info()
244 # Just return the local path and the "headers" for file:https://
245 # URLs. No sense in performing a copy unless requested.
File ~\anaconda3\Lib\urllib\request.py:525, in OpenerDirector.open(self, fullurl, data, timeout)
523 for processor in self.process_response.get(protocol, []):
524 meth = getattr(processor, meth_name)
--> 525 response = meth(req, response)
527 return response
File ~\anaconda3\Lib\urllib\request.py:634, in HTTPErrorProcessor.http_response(self, request, response)
631 # According to RFC 2616, "2xx" code indicates that the client's
632 # request was successfully received, understood, and accepted.
633 if not (200 <= code < 300):
--> 634 response = self.parent.error(
635 'http', request, response, code, msg, hdrs)
637 return response
File ~\anaconda3\Lib\urllib\request.py:563, in OpenerDirector.error(self, proto, *args)
561 if http_err:
562 args = (dict, 'default', 'http_error_default') + orig_args
--> 563 return self._call_chain(*args)
File ~\anaconda3\Lib\urllib\request.py:496, in OpenerDirector._call_chain(self, chain, kind, meth_name, *args)
494 for handler in handlers:
495 func = getattr(handler, meth_name)
--> 496 result = func(*args)
497 if result is not None:
498 return result
Beginning to download dataset...
HTTPError Traceback (most recent call last)
Cell In[2], line 10
4 os.makedirs(SAVE_PATH)
7 # Load Data, an array of SMILES for drug, an array of Amino Acid Sequence for Target and an array of binding values/0-1 label.
8 # e.g. ['Cc1ccc(CNS(=O)(=O)c2ccc(s2)S(N)(=O)=O)cc1', ...], ['MSHHWGYGKHNGPEHWHKDFPIAKGERQSPVDIDTH...', ...], [0.46, 0.49, ...]
9 # In this example, BindingDB with Kd binding score is used.
---> 10 X_drug, X_target, y = process_BindingDB(download_BindingDB(SAVE_PATH),
11 y = 'Kd',
12 binary = False,
13 convert_to_log = True)
15 # Type in the encoding names for drug/protein.
16 drug_encoding, target_encoding = 'CNN', 'Transformer'
File ~\anaconda3\Lib\site-packages\DeepPurpose\dataset.py:174, in download_BindingDB(path)
171 os.makedirs(path)
173 url = 'https://www.bindingdb.org/bind/downloads/BindingDB_All_2021m5.tsv.zip'
--> 174 saved_path = wget.download(url, path)
176 print('Beginning to extract zip file...')
177 with ZipFile(saved_path, 'r') as zip:
File ~\anaconda3\Lib\site-packages\wget.py:526, in download(url, out, bar)
524 else:
525 binurl = url
--> 526 (tmpfile, headers) = ulib.urlretrieve(binurl, tmpfile, callback)
527 filename = detect_filename(url, out, headers)
528 if outdir:
File ~\anaconda3\Lib\urllib\request.py:241, in urlretrieve(url, filename, reporthook, data)
224 """
225 Retrieve a URL into a temporary location on disk.
226
(...)
237 data file as well as the resulting HTTPMessage object.
238 """
239 url_type, path = _splittype(url)
--> 241 with contextlib.closing(urlopen(url, data)) as fp:
242 headers = fp.info()
244 # Just return the local path and the "headers" for file:https://
245 # URLs. No sense in performing a copy unless requested.
File ~\anaconda3\Lib\urllib\request.py:216, in urlopen(url, data, timeout, cafile, capath, cadefault, context)
214 else:
215 opener = _opener
--> 216 return opener.open(url, data, timeout)
File ~\anaconda3\Lib\urllib\request.py:525, in OpenerDirector.open(self, fullurl, data, timeout)
523 for processor in self.process_response.get(protocol, []):
524 meth = getattr(processor, meth_name)
--> 525 response = meth(req, response)
527 return response
File ~\anaconda3\Lib\urllib\request.py:634, in HTTPErrorProcessor.http_response(self, request, response)
631 # According to RFC 2616, "2xx" code indicates that the client's
632 # request was successfully received, understood, and accepted.
633 if not (200 <= code < 300):
--> 634 response = self.parent.error(
635 'http', request, response, code, msg, hdrs)
637 return response
File ~\anaconda3\Lib\urllib\request.py:563, in OpenerDirector.error(self, proto, *args)
561 if http_err:
562 args = (dict, 'default', 'http_error_default') + orig_args
--> 563 return self._call_chain(*args)
File ~\anaconda3\Lib\urllib\request.py:496, in OpenerDirector._call_chain(self, chain, kind, meth_name, *args)
494 for handler in handlers:
495 func = getattr(handler, meth_name)
--> 496 result = func(*args)
497 if result is not None:
498 return result
File ~\anaconda3\Lib\urllib\request.py:643, in HTTPDefaultErrorHandler.http_error_default(self, req, fp, code, msg, hdrs)
642 def http_error_default(self, req, fp, code, msg, hdrs):
--> 643 raise HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError: HTTP Error 404: 404
The text was updated successfully, but these errors were encountered: