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
The output is is given in the following cell. When computing the dask graph in the last line print(mean.compute()), the actual data needs to be accessed, which raises the warning. In larger examples it raises the error ''Aborting load due to failure while reading'.
When computing the dask graph in the last line print(mean.compute()), the actual data needs to be accessed, which raises the warning. In larger examples it raises ''Aborting load due to failure while reading'.
Expected Output
The access credentials should be somehow saved when open the data. Otherwise for each computation on the actual data, a new environment will need to be created and applied.
This I understand. However the idea is to lazy load the data in a reading routine and later load the data when plotting etc. Otherwise, each operation which loads the data needs to be performed within the environment session.
I downloaded one tile of the dataset and stored in one of our private S3 buckets. When accessing this file, it works as expected. The lazy loading is done within the environment session and operation with loading data can be done outside of the Env.
import rasterio
import rioxarray
uri = "s3://xxx/L2A_T33SXA_20150715T094306_B02_10m.jp2"
session = rasterio.session.AWSSession(
aws_unsigned=False,
aws_access_key_id="xxx",
aws_secret_access_key="xxx",
)
with rasterio.env.Env(session=session):
ds = rioxarray.open_rasterio(uri, chunks=dict(x=1024, y=1024))
print(ds)
mean = ds.mean()
print(mean)
print(mean.compute())
They only difference above is that I need to set an endpoint_url and `AWS_VIRTUAL_HOSTING=False. Do you think is can have an impact?
Code Sample, a copy-pastable example if possible
The code sample below raises a warning with an HTTP response 403. Note that key and secret for AWS bucket can be obtained by CDSE.
The output is is given in the following cell. When computing the dask graph in the last line
print(mean.compute())
, the actual data needs to be accessed, which raises the warning. In larger examples it raises the error ''Aborting load due to failure while reading'.When performing the last line within the rasterio Env, it works just fine.
Problem description
When computing the dask graph in the last line
print(mean.compute())
, the actual data needs to be accessed, which raises the warning. In larger examples it raises ''Aborting load due to failure while reading'.Expected Output
The access credentials should be somehow saved when open the data. Otherwise for each computation on the actual data, a new environment will need to be created and applied.
Environment Information
python -c "import rioxarray; rioxarray.show_versions()"
rioxarray (0.17.0) deps:
rasterio: 1.4.1
xarray: 2024.6.0
GDAL: 3.9.3
GEOS: 3.13.0
PROJ: 9.5.0
PROJ DATA: /home/konstantin/micromamba/envs/xcube-stac/share/proj
GDAL DATA: /home/konstantin/micromamba/envs/xcube-stac/share/gdal
Other python deps:
scipy: 1.14.1
pyproj: 3.7.0
System:
python: 3.12.7 | packaged by conda-forge | (main, Oct 4 2024, 16:05:46) [GCC 13.3.0]
executable: /home/konstantin/micromamba/envs/xcube-stac/bin/python
machine: Linux-6.8.0-47-generic-x86_64-with-glibc2.35
Installation method
Conda environment information (if you installed with conda):
Environment (
micromamba list
):Details about
micromamba
and system (micromamaba info
):The text was updated successfully, but these errors were encountered: