Unable to get data for lulc pipeline example

I am trying to make LULC map by using the LULC pipeline ipynb provided in github of eolearn.
I am facing an issue that my data I am unable to receive data from sentinel hub. I followed all the steps then while loading eopatches/eopatch_0 it says it doesnt exist that means definitely patches are not filling with satellite image even after calling for it.
i am guessing may be i made a mistake in guessing what is Instance id , shclient id but i actually tried all possible combinations from the sentinel dashboard (there are 3 ids so was confused between them) but since i tried all the combination atleast one should have worked?
but none did. Also i can see that my dash board statistcs shows 0 request and processing that means no calls were made to the hub.
what can I do now?

Hi @dubeyamit54321,

Since you’re not able to retrieve data, it must be something with the download task setup or the credentials, as you pointed out yourself.

My guess is, there is good chance that the issue is due to the credentials setup. The eo-learn LULC example doesn’t need the instance ID anywhere, it only uses the sh_client_id and the sh_client_secret, which are the OAuth clients.

On your dashboard I see two OAuth clients (4th image on the right) and you should set the ID and the secret for one of these two. If you don’t have the secret anymore, I suggest deleting the client and creating a new one in order to obtain the secret.

When you have both the ID and the secret, make sure they are correctly set up in your SH credentials config: https://sentinelhub-py.readthedocs.io/en/latest/configure.html OR in your python SHConfig() object.

Then try again to download the data and report back if you’re still experiencing issues.

1 Like

Thank You for Replying to my query!

No even after choosing the right credentials I am getting the same issue unable to retrieve data.
As per your suggestion I didnt use the Instance Id in the code but then it showed another problem ( I have shared the execution report report 1
So i used the instance id as well as oath id and secret it still not receiving data.
I have share the edited python notebook as well so that Its easy for you to execute yourself and see.
Also I have shared the report link (report 2) please check and let me know what can be done.
Also to let you know I am currently on 30days trail account, if that would bother this.

PFA of Snapshots of code where I updated the suggestions

Hmm, OK, I see you are using shell code execution via Jupyter cells, which for sure sets the credentials, but perhaps some combination with the colab causes the issue.

Instead of setting the SH credentials with shell commands, please try the following:

from sentinelhub import SHConfig

config = SHConfig()
config.sh_client_id = '<INPUT_CLIEND_ID>'
config.sh_client_secret = '<INPUT_CLIEND_secret>'

check the config object if everything is set up correctly, and then just provide the config object to the SentinelHubInputTask (like here).

Just to be sure, are you executing the notebook as-is, or are you changing the location/time_interval/etc…?

Also, I’m unfortunately unable to access the provided reports.


1 Like

I made use the snippet you provided for getting the credential set up. And it still didn’t work.

I am providing the github link of my updated code and reports as well, please check.
If possible please try it in your own and let me know if there is problem from myside or the sentinel server issue and how should i negotiate with it.
github = git

https://github.com/dubeyamit946/eolulc if the link doesn’t work.

Hi again.

Sorry for the late reply. I managed to look into your code and my first impression is that you use a lot of shell commands inside your notebook, which I would advise against because it makes the whole process much less intuitive and error prone.

The code works for me and I think it is an issue with the credentials. When you set them up in python, I wasn’t clear enough to instruct that you should also add the credentials to the input task, like this:

band_names = ['B02', 'B03', 'B04', 'B08', 'B11', 'B12']
add_data = SentinelHubInputTask(
    bands_feature=(FeatureType.DATA, 'BANDS'),
    bands = band_names,
    additional_data=[(FeatureType.MASK, 'dataMask', 'IS_DATA'),
                     (FeatureType.MASK, 'CLM'),
                     (FeatureType.DATA, 'CLP')],
    max_threads = 3,
    config=config  # <--- here

I think the issue in your original workflow is the following:

You loaded the notebook, installed sh-py and set the credentials via shell command. After that you should’ve restarted the Jupyter session in order for the package to read the credentials from disk.

The alternative way is to update the config from inside the Python, as suggested, but you must then manually provide the config to the SH EOTask.

Can you try now? It should work, but you never know…


It worked! there was another few problems which i solved over the time. And it finally worked.
just one more small issue has come.
as i export the tiff file of the merged prediction patches using GDAL.
The tiff file was actually grayscale. when i look at it in my QGIS. Its not downloaded as RGB. I dont know if thats something I missed on the exporting part or may be i am not making the right use of QGIS.



The prediction is a grayscale .tiff with raster values equal to the ID of the LULC class. Any colour mapping is up to you.

You should be able to construct a QGIS color map using the LULC class reference: https://nbviewer.jupyter.org/github/sentinel-hub/eo-learn/blob/develop/examples/land-cover-map/SI_LULC_pipeline.ipynb#Reference-map-task

Hope that helps!