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

server-mode swagger error #1482

Open
sbrunato opened this issue Jan 16, 2025 · 0 comments
Open

server-mode swagger error #1482

sbrunato opened this issue Jan 16, 2025 · 0 comments
Labels
bug Something isn't working server Server-mode related

Comments

@sbrunato
Copy link
Collaborator

In server-mode, http://127.0.0.1:5000/api.html returns an error:

Failed to load API definition.

Fetch error
Internal Server Error /openapi.json

With associated logs:

  File "/home/sylvain/workspace/eodag/eodag/rest/server.py", line 219, in forward_middleware
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/middleware/base.py", line 163, in call_next
    raise app_exc
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/middleware/base.py", line 149, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/middleware/cors.py", line 85, in __call__
    await self.app(scope, receive, send)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/home/sylvain/.virtualenvs/eodag-dev/lib/python3.12/site-packages/fastapi/applications.py", line 1009, in openapi
    return JSONResponse(self.openapi())
                        ^^^^^^^^^^^^^^
TypeError: eodag_openapi() missing 1 required positional argument: 'request'
@sbrunato sbrunato added bug Something isn't working server Server-mode related labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Server-mode related
Projects
None yet
Development

No branches or pull requests

1 participant