Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip file test fails on Windows as it cannot find groups #49

Open
corrado9999 opened this issue Apr 27, 2021 · 0 comments
Open

Zip file test fails on Windows as it cannot find groups #49

corrado9999 opened this issue Apr 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@corrado9999
Copy link
Collaborator

It is easier to check at the result of open_dataset:

>>> url = "zip://*/manifest.safe::S1B_IW_SLC__1SDV_20210401T052622_20210401T052650_026269_032297_EFA4.zip"
>>> xarray_sentinel.sentinel1.open_dataset(url)
<xarray.Dataset>
Dimensions:  ()
Data variables:
    *empty*
Attributes: (12/15)
    constellation:              sentinel-1
    platform:                   sentinel-1b
    instrument:                 ['c-sar']
    sat:orbit_state:            descending
    sat:absolute_orbit:         26269
    sat:relative_orbit:         168
    ...                         ...
    sar:polarizations:          ['VV', 'VH']
    sar:product_type:           SLC
    xs:instrument_mode_swaths:  ['IW1', 'IW2', 'IW3']
    groups:                     []
    Conventions:                CF-1.7
    history:                    created by xarray_sentinel-999

I tracked down the issue to the use of os.path.normpath in xarray_sentinel.esa_safe.get_ancillary_data_paths, which, on Windows, converts forward slashes in backslashes, perfectly valid for ordinary files but not accepted by fsspec zip protocol.

In deed, @alexamici put a comment indicating the hackiness of such normalization, but it is not clear to me what issue it tries to address.

@alexamici alexamici added the bug Something isn't working label Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants