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

Nepasileidžia serveris su pradiniais config duomenimis #798

Closed
JustinasKen opened this issue Sep 17, 2024 · 0 comments · Fixed by #799
Closed

Nepasileidžia serveris su pradiniais config duomenimis #798

JustinasKen opened this issue Sep 17, 2024 · 0 comments · Fixed by #799
Labels

Comments

@JustinasKen
Copy link
Contributor

JustinasKen commented Sep 17, 2024

Bandant paleisti serverį spinta run, nenurodant CONFIG_PATH (tai yra bandant paleisti su default reikšmėm)
bandydami pasiekti api endpoints, kurie nėra susiję su manifest (kaip /_srid/...)
gauname klaidas:

Traceback (most recent call last):
  File "\spinta\.venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 406, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "\spinta\.venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\applications.py", line 113, in __call__
    await self.middleware_stack(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\middleware\errors.py", line 187, in __call__
    raise exc
  File "\spinta\.venv\lib\site-packages\starlette\middleware\errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "\spinta\spinta\middlewares.py", line 29, in __call__
    await self.app(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "\spinta\.venv\lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "\spinta\.venv\lib\site-packages\starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "\spinta\.venv\lib\site-packages\starlette\_exception_handler.py", line 62, in wrapped_app
    raise exc
  File "\spinta\.venv\lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "\spinta\.venv\lib\site-packages\starlette\routing.py", line 73, in app
    response = await f(request)
  File "\spinta\spinta\api\__init__.py", line 264, in homepage
    commands.reload_backend_metadata(context, manifest, manifest.backend)
  File "\spinta\.venv\lib\site-packages\multipledispatch\dispatcher.py", line 273, in __call__
    raise NotImplementedError(
NotImplementedError: Could not find signature for reload_backend_metadata: <Context, MemoryManifest, NoneType>
Traceback (most recent call last):
  File "\spinta\.venv\lib\site-packages\starlette\_exception_handler.py", line 51, in wrapped_app
    await app(scope, receive, sender)
  File "\Spinta\spinta\.venv\lib\site-packages\starlette\routing.py", line 73, in app
    response = await f(request)
  File "\spinta\spinta\api\__init__.py", line 272, in homepage
    return await create_http_response(context, params, request)
  File "\spinta\spinta\utils\response.py", line 113, in create_http_response
    raise NoBackendConfigured(manifest)
spinta.exceptions.NoBackendConfigured: Backend is not configured, can't proceed the request.
  Context:
    component: spinta.manifests.memory.components.MemoryManifest
    manifest: default
    schema: None

Tai vyksta, kadangi

spinta/spinta/config.py

Lines 148 to 155 in a5e79c9

'manifests': {
'default': {
'type': 'memory',
'backend': '',
'mode': 'internal',
'keymap': '',
},
},

default.backend yra ''.

Reikia pakeisti, kad tai būtų, default, tokiu atvėju, paleidus serverį, nepakeitus config, pasileis su MemoryManifest ir MemoryBackend (dabar pasileidžia MemoryManifest be jokio backend).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant