OpenML
OpenML copied to clipboard
Error in downloading data
Description
I am trying to fetch data from openml using a combination of openml.datasets.list_datasets followed by openml.datasets.get_dataset but I am getting error on the first command.
Steps/Code to Reproduce
>>> openml_list = openml.datasets.list_datasets(open_cc_valid_dids)
Traceback (most recent call last):
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/_api_calls.py", line 387, in _send_request
__check_response(response=response, url=url, file_elements=files)
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/_api_calls.py", line 452, in __check_response
raise __parse_server_exception(response, url, file_elements=file_elements)
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/_api_calls.py", line 471, in __parse_server_exception
raise e
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/_api_calls.py", line 469, in __parse_server_exception
server_exception = xmltodict.parse(response.text)
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/xmltodict.py", line 359, in parse
parser.Parse(xml_input, True)
xml.parsers.expat.ExpatError: syntax error: line 1, column 49
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/datasets/functions.py", line 192, in list_datasets
return openml.utils._list_all( # type: ignore
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/utils.py", line 327, in _list_all
new_batch = listing_call(
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/datasets/functions.py", line 257, in _list_datasets
return __list_datasets(api_call=api_call, output_format=output_format)
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/datasets/functions.py", line 272, in __list_datasets
xml_string = openml._api_calls._perform_api_call(api_call, "get")
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/_api_calls.py", line 120, in _perform_api_call
response = __read_url(url, request_method, data)
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/_api_calls.py", line 342, in __read_url
return _send_request(
File "/private/home/sarthmit/.conda/envs/ticl/lib/python3.10/site-packages/openml/_api_calls.py", line 422, in _send_request
raise OpenMLServerError(
openml.exceptions.OpenMLServerError: Unexpected server error when calling https://www.openml.org/api/v1/xml/data/list/limit/10000/offset/0/data_id/13,25,35,40,41,43,48,49,51,53,55,56,59,61,187,329,333,334,335,336,337,338,377,446,450,451,452,460,463,464,466,470,475,481,679,694,717,721,724,733,738,745,747,748,750,753,756,757,764,765,767,774,778,786,788,795,796,798,801,802,810,811,814,820,825,826,827,831,839,840,841,844,852,853,854,860,880,886,895,900,906,907,908,909,915,925,930,931,934,939,940,941,949,966,968,984,987,996,1048,1054,1071,1073,1100,1115,1412,1442,1443,1444,1446,1447,1448,1451,1453,1488,1490,1495,1498,1499,1506,1508,1511,1512,1520,1523,4153,23499,40496,40646,40663,40669,40680,40682,40686,40690,40693,40705,40706,40710,40711,40981,41430,41538,41919,41976,42172,42261,42544,42585,42638. Please contact the developers!
Status code: 502
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request<p>Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.4.29 (Ubuntu) Server at www.openml.org Port 443</address>
</body></html>
Hi! We located and resolved the proxy error. Everything should be fine now.
Apologies for the inconvenience!