Issue: FileNotFoundError when Accessing HDF5 File in R2 Bucket via Python

For Workes & Pages, what is the name of the domain?

N/A: using a direct interaction with Cloudflare R2 through a Python application using S3 API

What is the error message?

FileNotFoundError: [Errno 2] Unable to synchronously open file (unable to open file: name = ‘r2://<bucket_name>/<h5_filename>’, errno = 2, error message = ‘No such file or directory’, flags = 0, o_flags = 0)

What is the issue or error you’re encountering

I’m encountering a FileNotFoundError when trying to access an HDF5 file stored in a Cloudflare R2 bucket using Python. The error message indicates that the file could not be found or opened.

What steps have you taken to resolve the issue?

I made sure that the environment variables containing access key, secret key and account ID are accurate. I have also directly tried entering the full path with account ID included:
https://<account_ID>.r2.cloudflarestorage.com/<bucket_name>/<file_name>. However, I get the same error.

Screenshot of the error