I’m using get_s2_evalscript from s2cloudless to get images from s2-L1C
Here is how I do it in Python
evalscript = get_s2_evalscript(
all_bands=True,
reflectance=True
)
And the output looks like the following;
//VERSION=3
function setup() {
return {
input: [{
bands: ["B01", "B02", "B03", "B04", "B05", "B06", "B07", "B08", "B8A", "B09", "B10", "B11", "B12", "dataMask"],
units: "reflectance"
}],
output: {
id: "bands",
bands: 14,
sampleType: "FLOAT32"
}
};
}
function evaluatePixel(sample) {
return [sample.B01, sample.B02, sample.B03, sample.B04, sample.B05, sample.B06, sample.B07, sample.B08, sample.B8A, sample.B09, sample.B10, sample.B11, sample.B12, sample.dataMask];
}
But when I run the following
wcs_img = sh_request.get_data(save_data=True)
I get the following error
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/api/v1/process
Server response: "{"status": 400, "reason": "Bad Request", "message": "Output default requested but missing from function setup()", "code": "COMMON_BAD_PAYLOAD"}"
My code used to run perfectly fine today Morning and all of a sudden it starts to complain about setup() function.
Any idea how to solve this?
Thanks a lot