bopen / xarray-sentinel

Xarray backend to Copernicus Sentinel-1 satellite data products
Apache License 2.0
219 stars 22 forks source link

`get_tag_list` can return a dictionary #47

Closed corrado9999 closed 3 years ago

corrado9999 commented 3 years ago

If the requested tag has one or more attributes, xmlschema returns a dict with the attribute names as keys plus the key $ for the actual list.

alexamici commented 3 years ago

Did you hit this bug when doing something useful? If not I'd just add and assert isinstance(tag_list, list).

alexamici commented 3 years ago

As far as I am concerned https://github.com/bopen/xarray-sentinel/commit/4f2a272e941477b6d67407f116dea5a2e955eeac fixes this bug. @corrado9999 please close it if you agree.

corrado9999 commented 3 years ago

@alexamici yes, I was trying something useful, but I have just realised I was doing it in the wrong way. Instead of asking for calibrationVector I asked for the common parent calibrationVectorList. The issue still persist in the degenerated case when e.g. only one calibrationVector is present, but it should not arise with our data, the assert should be enough.