Open gerritholl opened 11 months ago
This seems to have been introduced in https://github.com/pytroll/satpy/pull/2237 by @ameraner and @pnuu.
Shouldn't root variables start with a /
? Oh I guess they don't have to do they? Either way, can this be fixed by setting an initial value for p
?
/
is a prohibited character in variable names. And _collect_listed_variables
can't handle it either, as it will try to look for ''
.
Describe the bug
When a reader derives from
NetCDF4FileHandler
and usesrequired_netcdf_variables
using only root variables, thus no groups and no required variables containing a/
, instantiation will fail withUnboundLocalError
.To Reproduce
Expected behavior
I expect that I can create the file handler, or that it perhaps errors later due to not having implemented some mandatory pseudo-abstract methods.
Actual results
Environment Info:
Additional context
Although I haven't tested it, it would seem to not collect any root variables following an attribute.
I ran into this when writing unit tests for #2686.