Skip to main content

hello good morning guys, I have a problem when I invoke WcsRequest since immediately from that query the python webserver crashes


here is an example:


print(DataCollection.SENTINEL2_L1C)
print(bbox)
print(time_interval)
print(geometry_string)
print(config)

print(".........init......")
wms_ndvi_request = WcsRequest(
data_collection=DataCollection.SENTINEL2_L1C,
layer='NDVI',
bbox=bbox,
time=time_interval,
resx='1m',
resy='1m',
custom_url_params={
CustomUrlParam.SHOWLOGO: False,
CustomUrlParam.GEOMETRY: geometry_string
},
config=config,
image_format=MimeType.PNG
)
print(".......pass..........")



here is my output


-70.851314537592,-34.28884913749053,-70.8472481423739,-34.28506256335401

(‘2023-04-20’, ‘2023-04-24’)

POLYGON ((-70.85105945077191 -34.28853333329239, -70.84929374309499 -34.28884913749053, -70.8484491008594 -34.2876306846722, -70.8484898790654 -34.28761672809209, -70.84886952643761 -34.287505167612416, -70.84827626319301 -34.28676107806661, -70.8483179151226 -34.286559716432215, -70.8472481423739 -34.285166477050986, -70.84776167988582 -34.28506256335401, -70.84937820641751 -34.2871701808434, -70.8499282002056 -34.28702339361302, -70.8499709812803 -34.2870119751762, -70.85041179829561 -34.28728840630362, -70.851314537592 -34.28835590458149, -70.8513145283841 -34.28837652966331, -70.8512895941098 -34.288397942625316, -70.85105945077191 -34.28853333329239))


after this statement the web server shuts down as if it went through an exit() statement


I attached an image



It doesn’t show me any kind of error either, Thanks in advance

Hi @compras ,


I saw some failed WCS requests made yesterday from backlog, and it was caused by the server error. Would you mind trying your request again and see if it works? If not, please share the request url and the instance id (just the last 4 digits) with me. This would help me reproduce the request and investigate the issue. Thanks!


Thank you very much for the answer, carrying out tests, I continue to experience the same scenario


instance id: b7d3


I don’t know the request url, since i am using python package


example:

`from sentinelhub import WcsRequest


wms_ndvi_request = WcsRequest(

data_collection=DataCollection.SENTINEL2_L1C,

layer=‘NDVI’,

bbox=bbox,

time=time_interval,

resx=‘1m’,

resy=‘1m’,

custom_url_params={

CustomUrlParam.SHOWLOGO: False,

CustomUrlParam.GEOMETRY: geometry_string

},

config=config,

image_format=MimeType.PNG

)


`


@compras Maybe you could share the value of those parameters, i.e., time_interval, bbox, and geometry_string?


Yes, sure attach


bbox: -70.851314537592,-34.28884913749053,-70.8472481423739,-34.28506256335401


time_interval: (‘2023-04-20’, ‘2023-04-24’)


geometry_string:

POLYGON ((-70.85105945077191 -34.28853333329239, -70.84929374309499 -34.28884913749053, -70.8484491008594 -34.2876306846722, -70.8484898790654 -34.28761672809209, -70.84886952643761 -34.287505167612416, -70.84827626319301 -34.28676107806661, -70.8483179151226 -34.286559716432215, -70.8472481423739 -34.285166477050986, -70.84776167988582 -34.28506256335401, -70.84937820641751 -34.2871701808434, -70.8499282002056 -34.28702339361302, -70.8499709812803 -34.2870119751762, -70.85041179829561 -34.28728840630362, -70.851314537592 -34.28835590458149, -70.8513145283841 -34.28837652966331, -70.8512895941098 -34.288397942625316, -70.85105945077191 -34.28853333329239))


Hi @compras ,


I tested your script and it worked totally fine for me. Would you mind trying the code below:


from sentinelhub import SHConfig, DataCollection, CustomUrlParam, MimeType, WcsRequest, BBox, CRS

config = SHConfig()
config.instance_id = ****b7d3
config.sh_client_id = <your_client_id>
config.sh_client_secret = <your_client_secret>

bbox = BBox([-70.851314537592,-34.28884913749053,-70.8472481423739,-34.28506256335401
], crs=CRS.WGS84)

geometry_str = "POLYGON ((-70.85105945077191 -34.28853333329239, -70.84929374309499 -34.28884913749053, -70.8484491008594 -34.2876306846722, -70.8484898790654 -34.28761672809209, -70.84886952643761 -34.287505167612416, -70.84827626319301 -34.28676107806661, -70.8483179151226 -34.286559716432215, -70.8472481423739 -34.285166477050986, -70.84776167988582 -34.28506256335401, -70.84937820641751 -34.2871701808434, -70.8499282002056 -34.28702339361302, -70.8499709812803 -34.2870119751762, -70.85041179829561 -34.28728840630362, -70.851314537592 -34.28835590458149, -70.8513145283841 -34.28837652966331, -70.8512895941098 -34.288397942625316, -70.85105945077191 -34.28853333329239))"

wms_ndvi_request = WcsRequest(
data_collection=DataCollection.SENTINEL2_L1C,
layer='NDVI',
bbox=bbox,
time=('2023-04-20', '2023-04-24'),
image_format=MimeType.PNG,
resx='1m',
resy='1m',
custom_url_params={
CustomUrlParam.SHOWLOGO: False,
CustomUrlParam.GEOMETRY: geometry_str
},
config=config)

ndvi = wms_ndvi_request.get_data()

If you still encounter the same issue, please do the following:


  1. Generate a new pair of Sentinel Hub credentials and use it for the request

  2. After compiling your request with WmsRequest class, use the get_url_list() to get the url request.

  3. Share the url request and the last 4 digits of your sh_clinet_id (the one generated from the first step) with me

I will try to figure out what’s happening. Thank you.


 
chung.horng:

get_url_list

good morning guys, continuing with the thread, I have experienced the same scenario that I reported this time I had the opportunity to print the get_url_list()

sh_clinet_id : 9273
get_url_list() :

>'https://services.sentinel-hub.com/ogc/wcs/****b7d3?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&Geometry=POLYGON+%28%28-36.0997449075722+-71.50803601292721%2C+-36.099532928352+-71.5078097414699%2C+-36.0992559555003+-71.50751259627189%2C+-36.0990468731485+-71.5072749505991%2C+-36.0979065475087+-71.50739574171369%2C+-36.0981246700854+-71.50780622793719%2C+-36.097969422211+-71.5079779159051%2C+-36.0974056092804+-71.5077167106455%2C+-36.0973229944602+-71.5077960967442%2C+-36.097102391924+-71.5074857497155%2C+-36.0960854273114+-71.50756989061939%2C+-36.0956356078097+-71.50762214294529%2C+-36.094058949338+-71.5078151894345%2C+-36.093686814124+-71.5081258731765%2C+-36.0934592528514+-71.508476987791%2C+-36.0932245503338+-71.508871385598%2C+-36.0929812213578+-71.5092808639742%2C+-36.0927463852961+-71.5099101380908%2C+-36.0925856540396+-71.51012386558649%2C+-36.0923581890961+-71.51046491031759%2C+-36.0918166971411+-71.510922084597%2C+-36.0915855917919+-71.51110157640851%2C+-36.0911196366402+-71.5114928195953%2C+-36.0907583366842+-71.5117709373976%2C+-36.0912334299876+-71.5122233207078%2C+-36.0913098327301+-71.5121669809603%2C+-36.0914547982644+-71.5119907612156%2C+-36.091675077343+-71.5118101558342%2C+-36.0919409408606+-71.5117304626189%2C+-36.0920546290785+-71.5116459229292%2C+-36.092189194799+-71.51152814068401%2C+-36.092322748401+-71.51151225350959%2C+-36.0924374658351+-71.5116008260859%2C+-36.0925375145949+-71.5116585295288%2C+-36.0926835551475+-71.51167366352099%2C+-36.0928752981259+-71.51153823130311%2C+-36.0929532053269+-71.5113939339308%2C+-36.0934167837202+-71.5113749546134%2C+-36.0936598010881+-71.51130369858321%2C+-36.0940471978868+-71.5114652265873%2C+-36.0941739897999+-71.5114557004111%2C+-36.0943747964609+-71.51132872072709%2C+-36.0944928472783+-71.5112985710313%2C+-36.0948196075046+-71.511114565976%2C+-36.0953609685754+-71.5110097284075%2C+-36.0955067224745+-71.5108942744817%2C+-36.0956558383373+-71.51089195691399%2C+-36.0957464220353+-71.5108100685203%2C+-36.0959236349887+-71.5105613932577%2C+-36.0960087194744+-71.5106169138822%2C+-36.0961205188551+-71.5106251011549%2C+-36.0963230755238+-71.5106056223399%2C+-36.0966981110442+-71.5104238444646%2C+-36.0968947903448+-71.5102311701546%2C+-36.0969250985457+-71.51001059375641%2C+-36.0969761558863+-71.5096753857102%2C+-36.0970678411665+-71.5095901390838%2C+-36.0971826509251+-71.5095395371477%2C+-36.0973698990006+-71.50953419133%2C+-36.0977047222055+-71.5094905891895%2C+-36.097821873171+-71.50950335891351%2C+-36.0979817019093+-71.5095807854851%2C+-36.0980852610802+-71.509629293638%2C+-36.0981968987173+-71.50973005338339%2C+-36.0983636347243+-71.5098280466417%2C+-36.0984201873789+-71.509843409895%2C+-36.0987362894082+-71.5095550607639%2C+-36.0988431018677+-71.50953585208219%2C+-36.0989334615055+-71.50951385978659%2C+-36.0990389492067+-71.5095579086255%2C+-36.0993452766908+-71.50956087328279%2C+-36.0994572110214+-71.5095599137024%2C+-36.0996392906861+-71.5095385796976%2C+-36.0999593384223+-71.5095871951869%2C+-36.1001908603063+-71.50965786194121%2C+-36.1002314327176+-71.5096478502761%2C+-36.100413111591+-71.5094705126786%2C+-36.100560353012+-71.5091579765643%2C+-36.1005482783964+-71.5087824189111%2C+-36.1003650605123+-71.5085160993617%2C+-36.0997449075722+-71.50803601292721%29%29&BBOX=-36.100560353012%2C-71.5122233207078%2C-36.0907583366842%2C-71.5072749505991&FORMAT=image%2Ftiff&CRS=EPSG%3A4326&TIME=2023-05-03T14%3A52%3A54Z%2F2023-05-03T14%3A52%3A54Z&RESX=1m&RESY=1m&COVERAGE=PRUEBAS-NUBES&REQUEST=GetCoverage&VERSION=1.1.2', 'https://services.sentinel-hub.com/ogc/wcs/5c9f425a-f830-4164-8a6c-6059bcf1b7d3?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&Geometry=POLYGON+%28%28-36.0997449075722+-71.50803601292721%2C+-36.099532928352+-71.5078097414699%2C+-36.0992559555003+-71.50751259627189%2C+-36.0990468731485+-71.5072749505991%2C+-36.0979065475087+-71.50739574171369%2C+-36.0981246700854+-71.50780622793719%2C+-36.097969422211+-71.5079779159051%2C+-36.0974056092804+-71.5077167106455%2C+-36.0973229944602+-71.5077960967442%2C+-36.097102391924+-71.5074857497155%2C+-36.0960854273114+-71.50756989061939%2C+-36.0956356078097+-71.50762214294529%2C+-36.094058949338+-71.5078151894345%2C+-36.093686814124+-71.5081258731765%2C+-36.0934592528514+-71.508476987791%2C+-36.0932245503338+-71.508871385598%2C+-36.0929812213578+-71.5092808639742%2C+-36.0927463852961+-71.5099101380908%2C+-36.0925856540396+-71.51012386558649%2C+-36.0923581890961+-71.51046491031759%2C+-36.0918166971411+-71.510922084597%2C+-36.0915855917919+-71.51110157640851%2C+-36.0911196366402+-71.5114928195953%2C+-36.0907583366842+-71.5117709373976%2C+-36.0912334299876+-71.5122233207078%2C+-36.0913098327301+-71.5121669809603%2C+-36.0914547982644+-71.5119907612156%2C+-36.091675077343+-71.5118101558342%2C+-36.0919409408606+-71.5117304626189%2C+-36.0920546290785+-71.5116459229292%2C+-36.092189194799+-71.51152814068401%2C+-36.092322748401+-71.51151225350959%2C+-36.0924374658351+-71.5116008260859%2C+-36.0925375145949+-71.5116585295288%2C+-36.0926835551475+-71.51167366352099%2C+-36.0928752981259+-71.51153823130311%2C+-36.0929532053269+-71.5113939339308%2C+-36.0934167837202+-71.5113749546134%2C+-36.0936598010881+-71.51130369858321%2C+-36.0940471978868+-71.5114652265873%2C+-36.0941739897999+-71.5114557004111%2C+-36.0943747964609+-71.51132872072709%2C+-36.0944928472783+-71.5112985710313%2C+-36.0948196075046+-71.511114565976%2C+-36.0953609685754+-71.5110097284075%2C+-36.0955067224745+-71.5108942744817%2C+-36.0956558383373+-71.51089195691399%2C+-36.0957464220353+-71.5108100685203%2C+-36.0959236349887+-71.5105613932577%2C+-36.0960087194744+-71.5106169138822%2C+-36.0961205188551+-71.5106251011549%2C+-36.0963230755238+-71.5106056223399%2C+-36.0966981110442+-71.5104238444646%2C+-36.0968947903448+-71.5102311701546%2C+-36.0969250985457+-71.51001059375641%2C+-36.0969761558863+-71.5096753857102%2C+-36.0970678411665+-71.5095901390838%2C+-36.0971826509251+-71.5095395371477%2C+-36.0973698990006+-71.50953419133%2C+-36.0977047222055+-71.5094905891895%2C+-36.097821873171+-71.50950335891351%2C+-36.0979817019093+-71.5095807854851%2C+-36.0980852610802+-71.509629293638%2C+-36.0981968987173+-71.50973005338339%2C+-36.0983636347243+-71.5098280466417%2C+-36.0984201873789+-71.509843409895%2C+-36.0987362894082+-71.5095550607639%2C+-36.0988431018677+-71.50953585208219%2C+-36.0989334615055+-71.50951385978659%2C+-36.0990389492067+-71.5095579086255%2C+-36.0993452766908+-71.50956087328279%2C+-36.0994572110214+-71.5095599137024%2C+-36.0996392906861+-71.5095385796976%2C+-36.0999593384223+-71.5095871951869%2C+-36.1001908603063+-71.50965786194121%2C+-36.1002314327176+-71.5096478502761%2C+-36.100413111591+-71.5094705126786%2C+-36.100560353012+-71.5091579765643%2C+-36.1005482783964+-71.5087824189111%2C+-36.1003650605123+-71.5085160993617%2C+-36.0997449075722+-71.50803601292721%29%29&BBOX=-36.100560353012%2C-71.5122233207078%2C-36.0907583366842%2C-71.5072749505991&FORMAT=image%2Ftiff&CRS=EPSG%3A4326&TIME=2023-05-08T14%3A52%3A51Z%2F2023-05-08T14%3A52%3A51Z&RESX=1m&RESY=1m&COVERAGE=PRUEBAS-NUBES&REQUEST=GetCoverage&VERSION=1.1.2', 'https://services.sentinel-hub.com/ogc/wcs/5c9f425a-f830-4164-8a6c-6059bcf1b7d3?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&Geometry=POLYGON+%28%28-36.0997449075722+-71.50803601292721%2C+-36.099532928352+-71.5078097414699%2C+-36.0992559555003+-71.50751259627189%2C+-36.0990468731485+-71.5072749505991%2C+-36.0979065475087+-71.50739574171369%2C+-36.0981246700854+-71.50780622793719%2C+-36.097969422211+-71.5079779159051%2C+-36.0974056092804+-71.5077167106455%2C+-36.0973229944602+-71.5077960967442%2C+-36.097102391924+-71.5074857497155%2C+-36.0960854273114+-71.50756989061939%2C+-36.0956356078097+-71.50762214294529%2C+-36.094058949338+-71.5078151894345%2C+-36.093686814124+-71.5081258731765%2C+-36.0934592528514+-71.508476987791%2C+-36.0932245503338+-71.508871385598%2C+-36.0929812213578+-71.5092808639742%2C+-36.0927463852961+-71.5099101380908%2C+-36.0925856540396+-71.51012386558649%2C+-36.0923581890961+-71.51046491031759%2C+-36.0918166971411+-71.510922084597%2C+-36.0915855917919+-71.51110157640851%2C+-36.0911196366402+-71.5114928195953%2C+-36.0907583366842+-71.5117709373976%2C+-36.0912334299876+-71.5122233207078%2C+-36.0913098327301+-71.5121669809603%2C+-36.0914547982644+-71.5119907612156%2C+-36.091675077343+-71.5118101558342%2C+-36.0919409408606+-71.5117304626189%2C+-36.0920546290785+-71.5116459229292%2C+-36.092189194799+-71.51152814068401%2C+-36.092322748401+-71.51151225350959%2C+-36.0924374658351+-71.5116008260859%2C+-36.0925375145949+-71.5116585295288%2C+-36.0926835551475+-71.51167366352099%2C+-36.0928752981259+-71.51153823130311%2C+-36.0929532053269+-71.5113939339308%2C+-36.0934167837202+-71.5113749546134%2C+-36.0936598010881+-71.51130369858321%2C+-36.0940471978868+-71.5114652265873%2C+-36.0941739897999+-71.5114557004111%2C+-36.0943747964609+-71.51132872072709%2C+-36.0944928472783+-71.5112985710313%2C+-36.0948196075046+-71.511114565976%2C+-36.0953609685754+-71.5110097284075%2C+-36.0955067224745+-71.5108942744817%2C+-36.0956558383373+-71.51089195691399%2C+-36.0957464220353+-71.5108100685203%2C+-36.0959236349887+-71.5105613932577%2C+-36.0960087194744+-71.5106169138822%2C+-36.0961205188551+-71.5106251011549%2C+-36.0963230755238+-71.5106056223399%2C+-36.0966981110442+-71.5104238444646%2C+-36.0968947903448+-71.5102311701546%2C+-36.0969250985457+-71.51001059375641%2C+-36.0969761558863+-71.5096753857102%2C+-36.0970678411665+-71.5095901390838%2C+-36.0971826509251+-71.5095395371477%2C+-36.0973698990006+-71.50953419133%2C+-36.0977047222055+-71.5094905891895%2C+-36.097821873171+-71.50950335891351%2C+-36.0979817019093+-71.5095807854851%2C+-36.0980852610802+-71.509629293638%2C+-36.0981968987173+-71.50973005338339%2C+-36.0983636347243+-71.5098280466417%2C+-36.0984201873789+-71.509843409895%2C+-36.0987362894082+-71.5095550607639%2C+-36.0988431018677+-71.50953585208219%2C+-36.0989334615055+-71.50951385978659%2C+-36.0990389492067+-71.5095579086255%2C+-36.0993452766908+-71.50956087328279%2C+-36.0994572110214+-71.5095599137024%2C+-36.0996392906861+-71.5095385796976%2C+-36.0999593384223+-71.5095871951869%2C+-36.1001908603063+-71.50965786194121%2C+-36.1002314327176+-71.5096478502761%2C+-36.100413111591+-71.5094705126786%2C+-36.100560353012+-71.5091579765643%2C+-36.1005482783964+-71.5087824189111%2C+-36.1003650605123+-71.5085160993617%2C+-36.0997449075722+-71.50803601292721%29%29&BBOX=-36.100560353012%2C-71.5122233207078%2C-36.0907583366842%2C-71.5072749505991&FORMAT=image%2Ftiff&CRS=EPSG%3A4326&TIME=2023-05-13T14%3A52%3A54Z%2F2023-05-13T14%3A52%3A54Z&RESX=1m&RESY=1m&COVERAGE=PRUEBAS-NUBES&REQUEST=GetCoverage&VERSION=1.1.2', 'https://services.sentinel-hub.com/ogc/wcs/5c9f425a-f830-4164-8a6c-6059bcf1b7d3?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&Geometry=POLYGON+%28%28-36.0997449075722+-71.50803601292721%2C+-36.099532928352+-71.5078097414699%2C+-36.0992559555003+-71.50751259627189%2C+-36.0990468731485+-71.5072749505991%2C+-36.0979065475087+-71.50739574171369%2C+-36.0981246700854+-71.50780622793719%2C+-36.097969422211+-71.5079779159051%2C+-36.0974056092804+-71.5077167106455%2C+-36.0973229944602+-71.5077960967442%2C+-36.097102391924+-71.5074857497155%2C+-36.0960854273114+-71.50756989061939%2C+-36.0956356078097+-71.50762214294529%2C+-36.094058949338+-71.5078151894345%2C+-36.093686814124+-71.5081258731765%2C+-36.0934592528514+-71.508476987791%2C+-36.0932245503338+-71.508871385598%2C+-36.0929812213578+-71.5092808639742%2C+-36.0927463852961+-71.5099101380908%2C+-36.0925856540396+-71.51012386558649%2C+-36.0923581890961+-71.51046491031759%2C+-36.0918166971411+-71.510922084597%2C+-36.0915855917919+-71.51110157640851%2C+-36.0911196366402+-71.5114928195953%2C+-36.0907583366842+-71.5117709373976%2C+-36.0912334299876+-71.5122233207078%2C+-36.0913098327301+-71.5121669809603%2C+-36.0914547982644+-71.5119907612156%2C+-36.091675077343+-71.5118101558342%2C+-36.0919409408606+-71.5117304626189%2C+-36.0920546290785+-71.5116459229292%2C+-36.092189194799+-71.51152814068401%2C+-36.092322748401+-71.51151225350959%2C+-36.0924374658351+-71.5116008260859%2C+-36.0925375145949+-71.5116585295288%2C+-36.0926835551475+-71.51167366352099%2C+-36.0928752981259+-71.51153823130311%2C+-36.0929532053269+-71.5113939339308%2C+-36.0934167837202+-71.5113749546134%2C+-36.0936598010881+-71.51130369858321%2C+-36.0940471978868+-71.5114652265873%2C+-36.0941739897999+-71.5114557004111%2C+-36.0943747964609+-71.51132872072709%2C+-36.0944928472783+-71.5112985710313%2C+-36.0948196075046+-71.511114565976%2C+-36.0953609685754+-71.5110097284075%2C+-36.0955067224745+-71.5108942744817%2C+-36.0956558383373+-71.51089195691399%2C+-36.0957464220353+-71.5108100685203%2C+-36.0959236349887+-71.5105613932577%2C+-36.0960087194744+-71.5106169138822%2C+-36.0961205188551+-71.5106251011549%2C+-36.0963230755238+-71.5106056223399%2C+-36.0966981110442+-71.5104238444646%2C+-36.0968947903448+-71.5102311701546%2C+-36.0969250985457+-71.51001059375641%2C+-36.0969761558863+-71.5096753857102%2C+-36.0970678411665+-71.5095901390838%2C+-36.0971826509251+-71.5095395371477%2C+-36.0973698990006+-71.50953419133%2C+-36.0977047222055+-71.5094905891895%2C+-36.097821873171+-71.50950335891351%2C+-36.0979817019093+-71.5095807854851%2C+-36.0980852610802+-71.509629293638%2C+-36.0981968987173+-71.50973005338339%2C+-36.0983636347243+-71.5098280466417%2C+-36.0984201873789+-71.509843409895%2C+-36.0987362894082+-71.5095550607639%2C+-36.0988431018677+-71.50953585208219%2C+-36.0989334615055+-71.50951385978659%2C+-36.0990389492067+-71.5095579086255%2C+-36.0993452766908+-71.50956087328279%2C+-36.0994572110214+-71.5095599137024%2C+-36.0996392906861+-71.5095385796976%2C+-36.0999593384223+-71.5095871951869%2C+-36.1001908603063+-71.50965786194121%2C+-36.1002314327176+-71.5096478502761%2C+-36.100413111591+-71.5094705126786%2C+-36.100560353012+-71.5091579765643%2C+-36.1005482783964+-71.5087824189111%2C+-36.1003650605123+-71.5085160993617%2C+-36.0997449075722+-71.50803601292721%29%29&BBOX=-36.100560353012%2C-71.5122233207078%2C-36.0907583366842%2C-71.5072749505991&FORMAT=image%2Ftiff&CRS=EPSG%3A4326&TIME=2023-05-18T14%3A52%3A53Z%2F2023-05-18T14%3A52%3A53Z&RESX=1m&RESY=1m&COVERAGE=PRUEBAS-NUBES&REQUEST=GetCoverage&VERSION=1.1.2', 'https://services.sentinel-hub.com/ogc/wcs/5c9f425a-f830-4164-8a6c-6059bcf1b7d3?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&Geometry=POLYGON+%28%28-36.0997449075722+-71.50803601292721%2C+-36.099532928352+-71.5078097414699%2C+-36.0992559555003+-71.50751259627189%2C+-36.0990468731485+-71.5072749505991%2C+-36.0979065475087+-71.50739574171369%2C+-36.0981246700854+-71.50780622793719%2C+-36.097969422211+-71.5079779159051%2C+-36.0974056092804+-71.5077167106455%2C+-36.0973229944602+-71.5077960967442%2C+-36.097102391924+-71.5074857497155%2C+-36.0960854273114+-71.50756989061939%2C+-36.0956356078097+-71.50762214294529%2C+-36.094058949338+-71.5078151894345%2C+-36.093686814124+-71.5081258731765%2C+-36.0934592528514+-71.508476987791%2C+-36.0932245503338+-71.508871385598%2C+-36.0929812213578+-71.5092808639742%2C+-36.0927463852961+-71.5099101380908%2C+-36.0925856540396+-71.51012386558649%2C+-36.0923581890961+-71.51046491031759%2C+-36.0918166971411+-71.510922084597%2C+-36.0915855917919+-71.51110157640851%2C+-36.0911196366402+-71.5114928195953%2C+-36.0907583366842+-71.5117709373976%2C+-36.0912334299876+-71.5122233207078%2C+-36.0913098327301+-71.5121669809603%2C+-36.0914547982644+-71.5119907612156%2C+-36.091675077343+-71.5118101558342%2C+-36.0919409408606+-71.5117304626189%2C+-36.0920546290785+-71.5116459229292%2C+-36.092189194799+-71.51152814068401%2C+-36.092322748401+-71.51151225350959%2C+-36.0924374658351+-71.5116008260859%2C+-36.0925375145949+-71.5116585295288%2C+-36.0926835551475+-71.51167366352099%2C+-36.0928752981259+-71.51153823130311%2C+-36.0929532053269+-71.5113939339308%2C+-36.0934167837202+-71.5113749546134%2C+-36.0936598010881+-71.51130369858321%2C+-36.0940471978868+-71.5114652265873%2C+-36.0941739897999+-71.5114557004111%2C+-36.0943747964609+-71.51132872072709%2C+-36.0944928472783+-71.5112985710313%2C+-36.0948196075046+-71.511114565976%2C+-36.0953609685754+-71.5110097284075%2C+-36.0955067224745+-71.5108942744817%2C+-36.0956558383373+-71.51089195691399%2C+-36.0957464220353+-71.5108100685203%2C+-36.0959236349887+-71.5105613932577%2C+-36.0960087194744+-71.5106169138822%2C+-36.0961205188551+-71.5106251011549%2C+-36.0963230755238+-71.5106056223399%2C+-36.0966981110442+-71.5104238444646%2C+-36.0968947903448+-71.5102311701546%2C+-36.0969250985457+-71.51001059375641%2C+-36.0969761558863+-71.5096753857102%2C+-36.0970678411665+-71.5095901390838%2C+-36.0971826509251+-71.5095395371477%2C+-36.0973698990006+-71.50953419133%2C+-36.0977047222055+-71.5094905891895%2C+-36.097821873171+-71.50950335891351%2C+-36.0979817019093+-71.5095807854851%2C+-36.0980852610802+-71.509629293638%2C+-36.0981968987173+-71.50973005338339%2C+-36.0983636347243+-71.5098280466417%2C+-36.0984201873789+-71.509843409895%2C+-36.0987362894082+-71.5095550607639%2C+-36.0988431018677+-71.50953585208219%2C+-36.0989334615055+-71.50951385978659%2C+-36.0990389492067+-71.5095579086255%2C+-36.0993452766908+-71.50956087328279%2C+-36.0994572110214+-71.5095599137024%2C+-36.0996392906861+-71.5095385796976%2C+-36.0999593384223+-71.5095871951869%2C+-36.1001908603063+-71.50965786194121%2C+-36.1002314327176+-71.5096478502761%2C+-36.100413111591+-71.5094705126786%2C+-36.100560353012+-71.5091579765643%2C+-36.1005482783964+-71.5087824189111%2C+-36.1003650605123+-71.5085160993617%2C+-36.0997449075722+-71.50803601292721%29%29&BBOX=-36.100560353012%2C-71.5122233207078%2C-36.0907583366842%2C-71.5072749505991&FORMAT=image%2Ftiff&CRS=EPSG%3A4326&TIME=2023-05-23T14%3A52%3A56Z%2F2023-05-23T14%3A52%3A56Z&RESX=1m&RESY=1m&COVERAGE=PRUEBAS-NUBES&REQUEST=GetCoverage&VERSION=1.1.2']

It should be noted that these calls go through a loop enclosed in a python Thread, attentive to your comments I say goodbye


Hi @compras ,


I tested with the provided urls and all of them work, meaning that the requests sent from sentinelhub-py should go through without an issue.


We noted that you’re running the request on a thread of a Django server. It could also be possible that this is a Django issue as it is the Django server that shuts down when you make the request. Do you mind testing your script locally in your machine and see if your script works in another environment?


understood, thank you for the help, I will proceed to do what you recommend


Good morning guys, I keep experiencing the same error, the WcsRequest object shuts down the django webserver and does not issue any errors for this test, remove loop and tread from python in order to show you this behavior, I am using sentinelhub==3.3.0, I’m working with the same code from this thread


def post(self, request, *args, **kwargs):
print("****init******")

config = SHConfig()
config.sh_client_id = '....'
config.sh_client_secret = '...'
config.instance_id = '...'

print("****set var config******")

bbox = BBox(x-70.851314537592,-34.28884913749053,-70.8472481423739,-34.28506256335401
], crs=CRS.WGS84)

geometry_str = "POLYGON ((-70.85105945077191 -34.28853333329239, -70.84929374309499 -34.28884913749053, -70.8484491008594 -34.2876306846722, -70.8484898790654 -34.28761672809209, -70.84886952643761 -34.287505167612416, -70.84827626319301 -34.28676107806661, -70.8483179151226 -34.286559716432215, -70.8472481423739 -34.285166477050986, -70.84776167988582 -34.28506256335401, -70.84937820641751 -34.2871701808434, -70.8499282002056 -34.28702339361302, -70.8499709812803 -34.2870119751762, -70.85041179829561 -34.28728840630362, -70.851314537592 -34.28835590458149, -70.8513145283841 -34.28837652966331, -70.8512895941098 -34.288397942625316, -70.85105945077191 -34.28853333329239))"


try:
print("****set WcsRequest obj ******")
wms_ndvi_request = WcsRequest(
data_collection=DataCollection.SENTINEL2_L1C,
layer='NDVI',
bbox=bbox,
time=('2023-04-20', '2023-04-24'),
image_format=MimeType.PNG,
resx='1m',
resy='1m',
custom_url_params={
CustomUrlParam.SHOWLOGO: False,
CustomUrlParam.GEOMETRY: geometry_str
},
config=config)

ndvi = wms_ndvi_request.get_data()
print(ndvi)
print("**********")
except Exception as Error:
print("Error ...")
print(str(Error))

return Response({"data" : "OK"})```



! image|619x500](upload://yuuU9vVwYIYl2xfafuZJFNNunzd.png)

I attach the image of my powershell where you can see the print codes



Hi @compras


I recommend trying to use an updated version of sh-py and ensuring that you have all the necessary dependencies installed. Test the API request locally to see if it works as expected. If it does, you should take a look at your Django application.


To debug the Django app you could improve the error handling, I suggest implementing logging and catching specific Django or Django REST Framework exceptions. This will provide better insights into any errors that occur. By logging relevant information, you can diagnose issues more effectively and understand the root cause of the problem.


Reply