You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an issue with using pystac-client with our GeoServer OSEO STAC API.
The Client.get_collection() function doesn't work as it assumes there are no query parameters in the URL and builds the URL manually based on that.
The generated URL looks like <host-adress>/geoserver/ogc/stac/v1/collections?f=application%2Fjson/<collection-id> where ?f=application%2Fjson is left in the middle.
Traceback (most recent call last):
File "/home/ehuusko/Documents/paituli/stac/testing_get_colletion.py", line 6, in <module>
catalog_client.get_collection('sentinel2-l2a')
File "/home/ehuusko/miniconda3/envs/paituli-stac/lib/python3.12/site-packages/pystac_client/client.py", line 399, in get_collection
self._stac_io.read_json(url),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ehuusko/miniconda3/envs/paituli-stac/lib/python3.12/site-packages/pystac/stac_io.py", line 205, in read_json
txt = self.read_text(source, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ehuusko/miniconda3/envs/paituli-stac/lib/python3.12/site-packages/pystac_client/stac_api_io.py", line 168, in read_text
return self.request(href, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ehuusko/miniconda3/envs/paituli-stac/lib/python3.12/site-packages/pystac_client/stac_api_io.py", line 217, in request
raise APIError.from_response(resp)
pystac_client.exceptions.APIError: {"code":"NoApplicableCode","description":"Invalid mime type \"application/json/sentinel2-l2a\": Invalid token character '/' in token \"json/sentinel2-l2a\"\nInvalid mime type \"application/json/sentinel2-l2a\": Invalid token character '/' in token \"json/sentinel2-l2a\""}
We have an issue with using pystac-client with our GeoServer OSEO STAC API.
The
Client.get_collection()
function doesn't work as it assumes there are no query parameters in the URL and builds the URL manually based on that.The generated URL looks like
<host-adress>/geoserver/ogc/stac/v1/collections?f=application%2Fjson/<collection-id>
where?f=application%2Fjson
is left in the middle.Using
pystac.catalog.Catalog.get_child()
works:The text was updated successfully, but these errors were encountered: