sxs-collaboration / sxs

Python code for manipulating data from the SXS collaboration
MIT License
25 stars 18 forks source link

url not found error when using sxs.load(...) #81

Closed mhycheung closed 9 months ago

mhycheung commented 10 months ago

Hello!

When I try to load any metadata file or waveform from the catalog,

import sxs
sxs.load("SXS:BBH:0123/Lev/metadata.json")

I run into a 404 url not found error:

Found the following files to load from the SXS catalog:
    SXS:BBH:0123v5/Lev5/metadata.json
An error occurred when trying to access <https://zenodo.org/api/files/260cc66c-43d6-4dc9-ba2b-39be9a7b28ee/SXS:BBH:0123/Lev5/metadata.json>.
{'message': 'The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.', 'status': 404}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/markc/sxs_test/lib/python3.9/site-packages/sxs/handlers.py", line 230, in load
    download_file(download_url, path, progress=progress)
  File "/home/markc/sxs_test/lib/python3.9/site-packages/sxs/utilities/downloads.py", line 59, in download_file
    r.raise_for_status()
  File "/home/markc/sxs_test/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: NOT FOUND for url: https://zenodo.org/api/files/260cc66c-43d6-4dc9-ba2b-39be9a7b28ee/SXS:BBH:0123/Lev5/metadata.json

Is this a problem with zenodo? I think this error only starting occurring this week.

moble commented 10 months ago

Is this a problem with zenodo? I think this error only starting occurring this week.

Yeah, this is a temporary problem on their end. See here. I'll close this for now. If you still run into problems after Zenodo report that they're finished solving their problems (I would guess it'll be at least a few more days), feel free to reopen.

feroz6 commented 9 months ago

Hi, I am running into the same issue, I get the same 404 url not found error when running the example code posted in the Readme's Usage section.

moble commented 9 months ago

Thanks @feroz6. Now that Zenodo is back up and running, I see that they've actually changed their API, so the download links for files have all changed. I think I should just be able to change the JSON file that sxs gets its info from. But this will probably take at least a day.

moble commented 9 months ago

@mhycheung @feroz6 @gcompere Can you try again? The first time you try an sxs.load command, it should take a little longer than it used to, because it should load the new catalog, which has updated URLs for all the files. But then, it should just work as expected. Please let me know how it goes.

GeoffreyCompere commented 9 months ago

Dear Mike, Thank you so much for your fix!! It is now working perfectly. Best regards, Geoffrey