Closed bram-pramono closed 2 years ago
@bram-pramono The error you mention happens because the latest version 3.5 of sentinelhub no longer contains the function download_safe_format and uses one called AWSTileRequest instead (see [https://sentinelhub-py.readthedocs.io/en/latest/examples/aws_request.html].
A workaround is to downgrade to an earlier version of sentinelhub with this command from within your environment:
python -m pip install sentinelhub==3.4.4
Then the function will be available.
In future releases, we aim to adapt Pyeo to work with the latest version of sentinelhub, so thank you for bringing this to our attention.
Hi,
I just want to point out an issue I came across when using pyeo.queries_and_downloads module. It seems that the function download_safe_format is not available anymore in the sentinelhub package. This caused me the following error:
`File ~/miniconda3/envs/pyeo_env/lib/python3.8/site-packages/pyeo/queries_and_downloads.py:82, in
79 from botocore.exceptions import ClientError
80 from requests import Request
---> 82 from sentinelhub import download_safe_format
83 from sentinelsat import SentinelAPI, geojson_to_wkt, read_geojson
85 from pyeo.filesystem_utilities import check_for_invalid_l2_data, check_for_invalid_l1_data, get_sen_2_image_tile
ImportError: cannot import name 'download_safe_format' from 'sentinelhub' (~/miniconda3/envs/pyeo_env/lib/python3.8/site-packages/sentinelhub/init.py)`
To solve this, I removed the line manually on my local machine. Now, things seem to work normally.