Hello,
I'm using psb2.fetch_examples(...) to automatically download datasets from the PSB2 suite. However, the download fails silently due to an access error from the S3 bucket:
-
The code uses requests.get(s3_url) without checking the status_code. Therefore, even when AWS responds with HTTP 403 Forbidden, the error XML (AccessDenied) is saved to a file.
-
Later, the function load_json_lines(...) attempts to parse this file, which contains XML instead of JSON, leading to a JSONDecodeError.
I've verified with curl -v: the response is indeed a 403 with the AccessDenied error from S3.
Steps to Reproduce
import psb2
train, test = psb2.fetch_examples("datasets/psb2", "bouncing-balls", 2000, 200)
# -> JSONDecodeError, because the file contains AccessDenied XML, not JSON.
Hello,
I'm using psb2.fetch_examples(...) to automatically download datasets from the PSB2 suite. However, the download fails silently due to an access error from the S3 bucket:
The code uses requests.get(s3_url) without checking the status_code. Therefore, even when AWS responds with HTTP 403 Forbidden, the error XML (AccessDenied) is saved to a file.
Later, the function load_json_lines(...) attempts to parse this file, which contains XML instead of JSON, leading to a JSONDecodeError.
I've verified with curl -v: the response is indeed a 403 with the AccessDenied error from S3.
Steps to Reproduce