Hi,
I would like some help from you. I’m trying to run the notebook “SI_LULC_pipeline.ipynb” and I am finding an error that is attached.
regards,
Marcelo Maranhão,
Brazil
Hi,
I would like some help from you. I’m trying to run the notebook “SI_LULC_pipeline.ipynb” and I am finding an error that is attached.
regards,
Marcelo Maranhão,
Brazil
Hi Marcelo,
This error typically happens when you run out of processing power on your machine. When this happens to me, I reduce the number of workers
: e.g. executor.run(workers=2, multiprocess=True)
Hi Maxim,
I changed from 5 to 2 workers, but the same problem persists.
And if you set multiprocess=False
, does this help?
Hi,
Same problem remains. I think the generated report has some flags. Follow my sentinel hub configuration screen, is it correct?
Just a reminder: instance_id
, client_id
and secret_id
are sensitive material. When posting to the forum always make sure that you mask a significant part of the strings so that your account doesn’t get compromised.
What first jumps to mind seeing your credentials is that you should remove the <
and >
in your strings. You could try running the notebook again with the updated credentials to see if it solves your problem. Otherwise we will have to look at the report.html file.
Hi,
Thanks for warning about sensitive material. I removed <> and now another type of error appeared. How do I send you the report, since the upload does not allow this type of file.
For other users to benefit from this thread. The error:
ValueError: Configuration parameters 'sh_client_id' and 'sh_client_secret' have to be set in order to authenticate with Sentinel Hub service
can be solved by adding the config
variable to the SentinelHubInputTask
function:
add_data = SentinelHubInputTask(
bands_feature=(FeatureType.DATA, 'BANDS'),
bands = band_names,
resolution=10,
maxcc=0.8,
time_difference=datetime.timedelta(minutes=120),
data_collection=DataCollection.SENTINEL2_L1C,
additional_data=[(FeatureType.MASK, 'dataMask', 'IS_DATA'),
(FeatureType.MASK, 'CLM'),
(FeatureType.DATA, 'CLP')],
max_threads=5,
config=config
)
Hi,
I made the suggested changes but I still have error messages:
58 oauthlib.oauth2.rfc6749.errors.CustomOAuth2Error: ({‘status’: 400, ‘reason’: ‘Bad Request’, ‘message’: ‘Illegal client_id’, ‘code’: ‘OAUTH_ERROR’})
RuntimeError Traceback (most recent call last)
in
RuntimeError: Execution failed EOPatches with IDs:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
For more info check report at .\eoexecution-report-2021_07_07-16_47_53\report.html
Your error message leads me to think that you client/secret key pair isn’t correctly set. I would suggest to generate a new pair. To do so, you can follow the instructions in this page or in this Youtube video. Hope you can finally get to run this Notebook
Hi @tabletccar ,
You ran into this error most likely because you’re running out of processing power on your machine. To solve this problem you may need to reduce the number of workers
as mentioned here.
Hi,
Thanks for reminding me of previous messages, I hadn’t paid attention. It really worked, but now I think I will have to try a more powerful machine…my machine has 8Gb of RAM but I think the script is asking for more.
Hi,
would someone know how to solve this error?
ImportError Traceback (most recent call last)
<ipython-input-2-cc8586e29a23> in <module>
17 import numpy as np
18 np.random.seed(42)
---> 19 import geopandas as gpd
20 import matplotlib as mpl
21 import matplotlib.pyplot as plt
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/geopandas/__init__.py in <module>
3 from geopandas.array import _points_from_xy as points_from_xy # noqa
4
----> 5 from geopandas.io.file import read_file # noqa
6 from geopandas.io.sql import read_postgis # noqa
7 from geopandas.tools import sjoin # noqa
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/geopandas/io/file.py in <module>
4 import six
5
----> 6 import fiona
7
8 from geopandas import GeoDataFrame, GeoSeries
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/fiona/__init__.py in <module>
81 os.environ["PATH"] = os.environ["PATH"] + ";" + libdir
82
---> 83 from fiona.collection import BytesCollection, Collection
84 from fiona.drvsupport import supported_drivers
85 from fiona.env import ensure_env_with_credentials, Env
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/fiona/collection.py in <module>
7
8 from fiona import compat, vfs
----> 9 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
10 from fiona.ogrext import Session, WritingSession
11 from fiona.ogrext import buffer_to_virtual_file, remove_virtual_file, GEOMETRY_TYPES
**ImportError: libcharset.so.1: cannot open shared object file: No such file or directory**
Hum
I’ve come across an error like this before, although it has nothing to do with Sentinel Hub libraries. The reason i got the error was because of incompatibilities between libraries in my Python virtual environment.
If you are using a virtual environment (I always recommend doing so) I would try creating a new one with the necessary libraries and trying again. I don’t know if you have gdal
installed but sometime it is the culprit not playing nice with other libraries.
Finally, the way I solved the problem was to use Conda, which sorted all the incompatibilities for me.
Hi,
Yes, it might be a good idea to create a new environment and redo all the steps. I’m trying to install on Azure’s ML.
Hi,
I’m trying to install the package on a workstation and I re-installed the packages. Now I’m seeing the following error:
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from sentinelhub import SHConfig
2
3 config = SHConfig()
4
5 config.instance_id = ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’
can anybody help me?
Hi,
I was able to run the script until the step prior to “visualize the patches”, when execution stopped:
0%| | 0/25 [00:00<?, ?it/s]
I’m using the syntax suggested:
executor.run(workers=2, multiprocess=False)
The report log txt follows:
2021-08-04 16:30:30,959 eolearn.core.eoworkflow DEBUG Computing SentinelHubInputTask(*(), **{'bbox': BBox(((510000.0, 5135000.0), (515000.0, 5140000.0)), crs=CRS('32633')), 'time_interval': ['2019-01-01', '2019-12-31']})
2021-08-04 16:30:30,959 sentinelhub.sentinelhub_session DEBUG Creating a new authentication session with Sentinel Hub service
2021-08-04 16:30:30,959 requests_oauthlib.oauth2_session DEBUG Encoding `client_id` "********-****-4d1d-b305-d12952fcd62" with `client_secret` as Basic auth credentials.
2021-08-04 16:30:30,959 requests_oauthlib.oauth2_session DEBUG Requesting url https://services.sentinel-hub.com/oauth/token using method POST.
2021-08-04 16:30:30,959 requests_oauthlib.oauth2_session DEBUG Supplying headers {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'} and data {'grant_type': 'client_credentials'}
2021-08-04 16:30:30,959 requests_oauthlib.oauth2_session DEBUG Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x000001DDA6F10730>, 'verify': True, 'proxies': None}.
2021-08-04 16:30:30,959 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): services.sentinel-hub.com:443
2021-08-04 16:30:31,459 sentinelhub.download.handlers DEBUG Download attempt failed: HTTPSConnectionPool(host='services.sentinel-hub.com', port=443): Max retries exceeded with url: /oauth/token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))
3 attempts left, will retry in 5s
2021-08-04 16:30:36,473 sentinelhub.sentinelhub_session DEBUG Creating a new authentication session with Sentinel Hub service
2021-08-04 16:30:36,473 requests_oauthlib.oauth2_session DEBUG Encoding `client_id` "********-****-4d1d-b305-d12952fcd62" with `client_secret` as Basic auth credentials.
2021-08-04 16:30:36,473 requests_oauthlib.oauth2_session DEBUG Requesting url https://services.sentinel-hub.com/oauth/token using method POST.
2021-08-04 16:30:36,473 requests_oauthlib.oauth2_session DEBUG Supplying headers {'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'} and data {'grant_type': 'client_credentials'}
2021-08-04 16:30:36,473 requests_oauthlib.oauth2_session DEBUG Passing through key word arguments {'timeout': None, 'auth': <requests.auth.HTTPBasicAuth object at 0x000001DDA6F108E0>, 'verify': True, 'proxies': None}.
2021-08-04 16:30:36,473 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): services.sentinel-hub.com:443
I’m grateful if you can help.
Hi @tabletccar,
Did you take a look at the file report.html
? It should contain reports for all your eo patches with related error messages in case the processing fails. It can give everybody a better idea why the execution stopped.
Note: Please make sure to not post your full credentials publicly on the forum. I have edited your latest post.
Hi,
This error generated a folder “eoexecution-report-2021_08_08-20_05_40” and within these folder 6 files “eoexecution-1” numbered from 1 to 6 were generated. It did not generate the 25 files and the report file.