You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but currently this outputs an error because the metadata object cannot be constructed for all dandisets:
---------------------------------------------------------------------------
ValidationError Traceback (most recent call last)
Input In [18], in <cell line: 3>()
1from dandi.dandiapi import DandiAPIClient
----> 3 ids = [
4 dandiset.identifier
5for dandiset in DandiAPIClient().get_dandisets()
6if'LFP'in dandiset.get_metadata().assetsSummary.variableMeasured
7 ]
Input In [18], in <listcomp>(.0)
1from dandi.dandiapi import DandiAPIClient
3 ids = [
4 dandiset.identifier
5for dandiset in DandiAPIClient().get_dandisets()
----> 6 if 'LFP' in dandiset.get_metadata().assetsSummary.variableMeasured
7 ]
File /opt/conda/lib/python3.10/site-packages/dandi/dandiapi.py:930, in RemoteDandiset.get_metadata(self)
925defget_metadata(self) -> models.Dandiset:
926"""927 Fetch the metadata for this version of the Dandiset as a
928`dandischema.models.Dandiset` instance
929"""
--> 930 return models.Dandiset.parse_obj(self.get_raw_metadata())
File /opt/conda/lib/python3.10/site-packages/pydantic/main.py:526, in pydantic.main.BaseModel.parse_obj()
File /opt/conda/lib/python3.10/site-packages/pydantic/main.py:342, in pydantic.main.BaseModel.__init__()
ValidationError: 1 validation error for Dandiset
license
ensure this value has at least 1 items (type=value_error.list.min_items; limit_value=1)
I will try to use get_raw_metadata as a work-around, but I suspect the metadata object is the preferred access pattern.
The text was updated successfully, but these errors were encountered:
#1189 seems of the same kind or even a duplicate of this one and @jwodder noted that indeed get_raw_metadata to be used if not carrying about validity of the metadata record. Feel free to reopen if you feel that smth needs to be done differently.
Looking for data with LFP, I'd like to be able to run:
but currently this outputs an error because the metadata object cannot be constructed for all dandisets:
I will try to use
get_raw_metadata
as a work-around, but I suspect the metadata object is the preferred access pattern.The text was updated successfully, but these errors were encountered: