Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Hateoas Provider #1610

Closed
asifgis opened this issue Apr 3, 2024 · 0 comments · Fixed by #1611
Closed

Issue with Hateoas Provider #1610

asifgis opened this issue Apr 3, 2024 · 0 comments · Fixed by #1611
Assignees
Labels
bug Something isn't working
Milestone

Comments

@asifgis
Copy link

asifgis commented Apr 3, 2024

Description

earth-data:
        type: stac-collection
        title: OOC_Cubes_and_clouds
        id: OOC_Cubes_and_clouds
        description: Cubes and Clouds catalog for course submissions
        providers:
            - type: stac
              name: Hateoas
              data: https://esa.pages.eox.at/cubes-and-clouds-catalog/MOOC_Cubes_and_clouds
              file_types: catalog.json
        links: 
            -
earth-data-Not-working:
        type: stac-collection
        title: OOC_Cubes_and_clouds-not-working
        id: OOC_Cubes_and_clouds-not-working
        description: Cubes and Clouds catalog for course submissions not working
        providers:
            - type: stac
              name: Hateoas
              data: https://esa.pages.eox.at/cubes-and-clouds-catalog/MOOC_Cubes_and_clouds
              file_types: catalog.json            

Links in yaml configuration is mandatory. Please check the above examples one is working with links and other without links. Without links in the config generate the below error.

  File "d:\flask_app_geoapi\pygeoapi\.venv\lib\site-packages\flask\app.py", line 1488, in __call__
    return self.wsgi_app(environ, start_response)
  File "d:\flask_app_geoapi\pygeoapi\.venv\lib\site-packages\flask\app.py", line 1466, in wsgi_app
    response = self.handle_exception(e)
  File "d:\flask_app_geoapi\pygeoapi\.venv\lib\site-packages\flask\app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
  File "d:\flask_app_geoapi\pygeoapi\.venv\lib\site-packages\flask\app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "d:\flask_app_geoapi\pygeoapi\.venv\lib\site-packages\flask\app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
  File "d:\flask_app_geoapi\pygeoapi\.venv\lib\site-packages\flask\app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "D:\flask_app_geoapi\pygeoapi\pygeoapi\flask_app.py", line 482, in stac_catalog_path
    return get_response(api_.get_stac_path(request, path))
  File "D:\flask_app_geoapi\pygeoapi\pygeoapi\api.py", line 228, in inner
    headers, status, content = func(*args, **kwargs)
  File "D:\flask_app_geoapi\pygeoapi\pygeoapi\api.py", line 210, in inner
    return func(cls, req_out, *args[2:])
  File "D:\flask_app_geoapi\pygeoapi\pygeoapi\linked_data.py", line 60, in inner
    return func(*args, **kwargs)
  File "D:\flask_app_geoapi\pygeoapi\pygeoapi\api.py", line 3957, in get_stac_path
    content['links'].extend(stac_collections[dataset]['links'])
KeyError: 'links'

Steps to Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots/Tracebacks
If applicable, add screenshots to help explain your problem.

Environment

  • OS:
  • Python version:
  • pygeoapi version:

Additional context
Add any other context about the problem here.

@asifgis asifgis added the bug Something isn't working label Apr 3, 2024
@tomkralidis tomkralidis self-assigned this Apr 3, 2024
@tomkralidis tomkralidis added this to the 0.17.0 milestone Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants