Page 1 of 1

Earthaccess 403

Posted: Fri Apr 04, 2025 11:12 am America/New_York
by tfrankstone
Hi all -- I'm trying to use earthaccess to grab some files and am running into a 403 error for a file in the middle of the search time period. Ideally, I'd like to just skip the files where there's an error and pull whatever's available. Is there a way to modify the earthaccess.open function to handle errors differently? Thanks!

results = earthaccess.search_data(
short_name = "PACE_OCI_L3M_CHL",
temporal = ("2024-08-01", "2024-10-01"),
bounding_box = bbox
)

paths = earthaccess.open(results)
paths

Re: Earthaccess 403

Posted: Tue Apr 08, 2025 10:04 am America/New_York
by OB.DAAC - amscott
Actually, I am not sure! Here is the users guide for earthaccess: https://earthaccess.readthedocs.io/en/latest/user_guide/

Let's both take a look to see if a good solution is there.

Re: Earthaccess 403

Posted: Tue Apr 08, 2025 3:16 pm America/New_York
by OB.DAAC - itcarroll
There is not a built-in way to handle errors from some items within a list of results. There is a relevant feature request, and the comments include a possibly helpful workaround:

https://github.com/nsidc/earthaccess/issues/600