ICOS-Carbon-Portal / pylib

Python library for direct access to ICOS time series data.
12 stars 3 forks source link

error while reading collection as digital object #154

Open claudiodonofrio opened 1 year ago

claudiodonofrio commented 1 year ago

Reading a collection as Dobj leads to an error.

from icoscp.cpb.dobj import Dobj
pid = 'https://meta.icos-cp.eu/objects/UqPhG00TNqHmcRybZ1e43ZX9'
dobj = Dobj(pid)

A graceful way of checking (valid / not valid) and returning ---is the pid a readable digital object? --- would make the library more resilient, and easier to handle with. check: metadata.py , line 93

olivierbonte commented 10 months ago

Hi, I think I have a problem might be related. When I try to download the Warm Winter 2020 ecosystem eddy covariance flux product ( https://doi.org/10.18160/2G60-ZHAK), I get an error on the same line (metadta.py line 93). Specifically, I execute following code

from icoscp.collection import collection
collection.get('10.18160/2G60-ZHAK')

Is it simply impossible to download this dataset via the current API?

Kind regards Olivier

claudiodonofrio commented 10 months ago

@olivierbonte many thanks for your feedback. This issue is on the roadmap for the next release we are working on.