Giter Club home page Giter Club logo

Comments (18)

psychemedia avatar psychemedia commented on June 13, 2024 1

Ah, okay.. thanks...

To make things easy for a complete novice such as me, it would probably make sense in the notebook to add something like:

#If not already set, add a Sentinel Hub instance ID
#If you don't already have a Sentinel Hub user ID, create a free user account: https://www.sentinel-hub.com/
#From the Sentinel Hub Configurator, https://apps.sentinel-hub.com/configurator/#/configurations 
#  create a new instance of type "Python Scripts Template"
# copy the instance ID and insert it (in quotes) below
INSTANCE_ID = None

in a cell near the top of the notebook and then instance_id=INSTANCE_ID elsewhere.

Trying again, it ran longer but kept killing the notebook kernel on MyBinder when running the cell:

result = workflow.execute({input_task:{'bbox':dam_bbox, 'time_interval':time_interval},})

(Not sure if it works on pangeo or GESIS binder). I tried to reduce the time_interval in the preceding cell but it still bombed out for me?

from eo-learn.

azupanc avatar azupanc commented on June 13, 2024

Do you have a Sentinel Hub account? If yes, then you can add your instance id to the sentinelhub python package configuration as described here https://sentinelhub-py.readthedocs.io/en/latest/configure.html or set it directly as an argument in the initialization of the S2L1CWCSInput task in input cell 6.

If you don't have a Sentinel Hub account yet, then you'll have to create (free trail is sufficient) one at https://sentinel-hub.com.

from eo-learn.

psychemedia avatar psychemedia commented on June 13, 2024

Ah.. thanks... :-( on having to set up credentials though...

from eo-learn.

psychemedia avatar psychemedia commented on June 13, 2024

Hmmm.. it looks from the docs - https://sentinelhub-py.readthedocs.io/en/latest/configure.html - like AWS credentials are also required (Requester pays storage?)

Not possible for me to create and run an open teaching related demo then?

from eo-learn.

AleksMat avatar AleksMat commented on June 13, 2024

AWS credentials are only required if you would be downloading entire Sentinel-2 tiles from AWS. But eo-learn currently only uses that part of sentinelhub package which downloads data from Sentinel Hub services. Therefore you don't have to set AWS credentials.

from eo-learn.

azupanc avatar azupanc commented on June 13, 2024

If you're not going to download ESA tiles from AWS, then you don't need AWS credentials. And I'm almost certain that you don't plan to do this, so you're fine. These configuration settings are just placeholders for those who download tiles from AWS.

BTW, the fact that you're doing an open teaching related demo is very interesting. Would you mind to share more? Any resources already available online?

from eo-learn.

psychemedia avatar psychemedia commented on June 13, 2024

Ok, thanks, I'm doing something wrong in just creating a new Sentinel Hub instance then (I tried all the default options) trying to get the above linked demo notebook to run. I guess I need to go and read some docs...

from eo-learn.

psychemedia avatar psychemedia commented on June 13, 2024

Re: teaching - v. early stages: I'm in the process of trying to put together a variety of "getting started" notebook demos that just show a complete novice how to get started using various packages using Jupyter notebooks. (It's part of an informal advocacy project trying to raise awareness of what notebooks can do / show that it's a medium that has relevance across a wide range of Higher Ed academic subject areas. (I'm just using Azure notebooks as a scratchpad; binderised notebooks will be in https://github.com/psychemedia/showntell as and when I get round to revisiting that repo and tidying it up... I'm also starting to try and start sharing interesting notebook examples via https://tinyletter.com/TrackingJupyter/archive )

I'm spread really thin on it - and am flying blind with lack of subject knowledge for most of the demos!

(eg for Sentinel Hub, I went into configurator - https://apps.sentinel-hub.com/configurator/#/configurations - and selected a new EO_Browser-Sentinel-2 Template, then just grabbed the ID. That just gives an error when I run the notebook: "Layer TRUE-COLOR-S2-L1C not found")

from eo-learn.

batic avatar batic commented on June 13, 2024

Hi,

In the configurator, create an instance based on 'Python Scripts Template'. That one has all the layers we use in our examples.

from eo-learn.

psychemedia avatar psychemedia commented on June 13, 2024

@batic Thanks... tried that.

First run, with credentials set via instance_id parameter in code cell 6 gives me a 'no instance ID' error in the result = workflow.exectute() line. Prefixing that with ! sentinelhub.config --instance_id MYINSTANCE_ID crashes the Binder kernel. I tried reducing the date window to see if it helped, but it doesn't seem to.

from eo-learn.

batic avatar batic commented on June 13, 2024

Just to make sure: you've picked the instance_id from the instance you've created from 'Python Scripts Template' and added it to cell 6?

from eo-learn.

psychemedia avatar psychemedia commented on June 13, 2024

Yep...

from eo-learn.

azupanc avatar azupanc commented on June 13, 2024

Hi Tony, the instance_id argument has to be specified in all eo-learn tasks that download data from Sentinel Hub. In this particular example these tasks are:

input_task = S2L1CWCSInput('TRUE-COLOR-S2-L1C', resx='20m', resy='20m', maxcc=0.5,instance_id=None)
add_ndwi = S2L1CWCSInput('NDWI',instance_id=None)
cloud_det = AddCloudMaskTask(cloud_classifier, 'BANDS-S2CLOUDLESS', cm_size_y='160m',cm_size_x='160m',cmask_feature='CLM', cprobs_feature='CLP', instance_id=None)

Can you set in your notebook None with your instance id in initialization of the above three tasks and run it again? I hope this will solve your issue (at least it works for me).

Thanks for sharing your teaching plans. One of the most important reasons why we've decided to open source the eo-learn was to enable anyone with some programming knowledge (and none related to remote sensing) to be able to start extracting value out of satellite imagery. Your efforts are therefore very much appreciated.

from eo-learn.

DevleenaBhattacharjee avatar DevleenaBhattacharjee commented on June 13, 2024

Many thanks ! I have been fighting the strange error since yesterday.
As psychemedia said, can we have this as a starting note for first timers like myself please ?
I did the configuration but got a little fuzzled on where all to mention the instance id

from eo-learn.

devisperessutti avatar devisperessutti commented on June 13, 2024

We've added a eo-learn-workshop repo where everyone can test out eo-learn in a Binder environment. There, you can also find clear instructions on how to set up your Sentinel-Hub account.

from eo-learn.

tushar-17-00 avatar tushar-17-00 commented on June 13, 2024

I am trying to execute one of the examples from this eo-learn-workshop repo. I got an error:

%%time
TIME_INTERVAL = '2017-01-01', '2019-01-01'
result = workflow.execute({
input_task: {
'bbox': wb_bbox,
'time_interval': TIME_INTERVAL
}
})

ValueError: During execution of task S2L1CWCSInput: Parameter time_interval was neither defined in initialization of S2L1CWCSInput nor is contained in EOPatch

Although I have already defined the time interval.

from eo-learn.

AleksMat avatar AleksMat commented on June 13, 2024

Hi @tushar-17-00,

I can't say for sure but my guess would be that your instance of input_task is not the same as the one you put into your workflow instance. Because of that time_interval parameter wouldn't get passed to the correct input task.

Could you try to restart your notebook and run it again? If that doesn't work, please send us some more context to reproduce this issue.

from eo-learn.

Dev-Gaju avatar Dev-Gaju commented on June 13, 2024

I already set instance_id="" from my sentinel Hub account but this problem, not solve yet.
Any suggession ? Is there any way to set sentinelHub Id in Jupyter Notebook?

ValueError: During execution of task SentinelHubInputTask: Instance ID is not set. Set it either in request initialization or in configuration file. Check http://sentinelhub-py.readthedocs.io/en/latest/configure.html for more info.

from eo-learn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.