Back to DrivenData | Blog

Access Planetary Computing during Submission

Hello, here it is stated that access to the Planetary Computer is allowed during evaluation of a submission. I am trying to download extra bands but having connection issues:

File “/srv/conda/envs/condaenv/lib/python3.9/site-packages/pystac_client/”, line 436, in get_items
for item_collection in self.get_item_collections():
File “/srv/conda/envs/condaenv/lib/python3.9/site-packages/pystac_client/”, line 424, in get_item_collections
for page in self._stac_io.get_pages(self.url, self.method, self.get_parameters()):
File “/srv/conda/envs/condaenv/lib/python3.9/site-packages/pystac_client/”, line 209, in get_pages
page = self.read_json(url, method=method, parameters=parameters)
File “/srv/conda/envs/condaenv/lib/python3.9/site-packages/pystac/”, line 197, in read_json
txt = self.read_text(source, *args, **kwargs)
File “/srv/conda/envs/condaenv/lib/python3.9/site-packages/pystac_client/”, line 77, in read_text
return self.request(href, *args, parameters=parameters, **kwargs)
File “/srv/conda/envs/condaenv/lib/python3.9/site-packages/pystac_client/”, line 139, in request
raise APIError(str(err))
pystac_client.exceptions.APIError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))

Do we have to do something special to have connection to the STAC API ?


@jsensio It’s hard to tell just from the stack trace what the issue may be. If you haven’t, I’d recommend looking at the tutorial for pulling additional bands. The method shown there should work in a submission. I hope that helps!

Well, I think is clear from the last line:

There is a connection error to the API from the evaluation environment. I am using the same code from the tutorials. Locally everything works fine. So my impression is that the problem comes from internet connection being disabled during evaluation. Have you tried and validated that access to the planetary computer works fine during evaluation ?


I tried to use new bands, everything worked fine except that it did not really help.

Also, we have to put query code in a try except block. Not all images have new bands in 60-minute interval. I need to increase to 180 minutes to have them. Also the query is so slow.

1 Like

Thanks for your reply, that must be the issue.

Thanks @motoki for the tip. In any case, I would to know if you or @jsensio used the rioxarray for loading additional PySTAC assets in your submissions — I ask this to you because I am getting an error message stating No module named ‘rioxarray’.

there’s an open PR to add rioxarray in the cloud-cover-runtime, hopefully it gets merged soon

I raised the time window to 180 minutes but still having connection issues 🥲
@ials I am using rasterio over rioxarray since I m not familiar with the later. That is the only change I made to the tutorial code. Nevertheless making a PR to add a new library is very easy and fast, I did it for the flooding competition and the team was very responsive in adding the new library.

Should we team up so you could focus on the real work? I am tired of getting same scores after many tries.

BTW, I have some interesting findings.

Then I don’t have any better idea. I don’t have connection issues.

There are restrictions on internet access in the code execution environment, but we allow the Planetary Computer STAC API ( I’ve confirmed that all of the compute resources can access that URL, so I’m not sure what it could be.

Also I just merged the PR that adds rioxarray, so it should be available in the code execution environment in a few minutes.

1 Like