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

No such file or directory when calling get_data on product which contains XML file #65

Open
amarandon opened this issue Nov 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@amarandon
Copy link
Collaborator

Given this code:

from eodag import EODataAccessGateway, setup_logging
from rasterio.crs import CRS

setup_logging(3)

dag = EODataAccessGateway()

product_type = 'S2_MSI_L1C'
footprint = {'lonmin': 0.99, 'latmin': 42.99, 'lonmax': 1.01, 'latmax': 43.01}
start, end = '2020-06-04', '2020-06-05'
search_results = dag.search(productType=product_type, geom=footprint, start=start, end=end, provider="dedl")

data = search_results[0].get_data(
    crs=CRS.from_epsg(4326),
    resolution=0.0006,
    band="T31TCG_20200604T104619_B01.jp2",
    extent=footprint
)

We get the following error:

File [~/venvs/stackstac/lib/python3.12/site-packages/rasterio/env.py:463](http://localhost:8888/home/amarando/venvs/stackstac/lib/python3.12/site-packages/rasterio/env.py#line=462), in ensure_env_with_credentials.<locals>.wrapper(*args, **kwds)
    460     session = DummySession()
    462 with env_ctor(session=session):
--> 463     return f(*args, **kwds)

File [~/venvs/stackstac/lib/python3.12/site-packages/rasterio/__init__.py:355](http://localhost:8888/home/amarando/venvs/stackstac/lib/python3.12/site-packages/rasterio/__init__.py#line=354), in open(fp, mode, driver, width, height, count, crs, transform, dtype, nodata, sharing, opener, **kwargs)
    352     path = _parse_path(raw_dataset_path)
    354 if mode == "r":
--> 355     dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
    356 elif mode == "r+":
    357     dataset = get_writer_for_path(path, driver=driver)(
    358         path, mode, driver=driver, sharing=sharing, **kwargs
    359     )

File rasterio[/_base.pyx:312](http://localhost:8888/_base.pyx#line=311), in rasterio._base.DatasetBase.__init__()

RasterioIOError: [/tmp/S2B_MSIL1C_20200604T104619_N0500_R051_T31TCH_20230616T160158/MTD_MSIL1C.xml](http://localhost:8888/tmp/S2B_MSIL1C_20200604T104619_N0500_R051_T31TCH_20230616T160158/MTD_MSIL1C.xml): No such file or directory
@amarandon amarandon added the bug Something isn't working label Nov 4, 2024
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

1 participant