JuliaClimate / CDSAPI.jl

Julia API to the Climate Data Store (a.k.a. CDS)
https://cds.climate.copernicus.eu
MIT License
23 stars 6 forks source link

retrieve() throws error if a path is provided instead of filename #23

Closed LakshyaKhatri closed 4 years ago

LakshyaKhatri commented 4 years ago

this works:

CDSAPI.retrieve(<some_name>, <some_params>, "<filename>.<extension>")

But this throws error:

CDSAPI.retrieve(<some_name>, <some_params>, "<path_to_file>/<filename>.<extension>")
juliohm commented 4 years ago

Thank you @LakshyaKhatri for carefully checking it. Could you please address the issue? I'be happy to review.

LakshyaKhatri commented 4 years ago

Okay :D

LakshyaKhatri commented 4 years ago

The issue is causing due to the use of Julia's download(). I can resolve the error, but I think implementing a pure Julian download function will surely give us more control. Something like this: Julia download function

juliohm commented 4 years ago

Nice @LakshyaKhatri, thanks for the search.

@oxinabox did you have a chance to register that module you shared as a gist somewhere? We are encountering issues with Julia's built-in download as pointed above.

oxinabox commented 4 years ago

Yeah, that code now lives in HTTP.jl As HTTP.download

juliohm commented 4 years ago

@LakshyaKhatri that is good news :) Can you please try HTTP.download?