openeduhub / metaqs-main

Backend Service providing Information about Completeness of Metadata and Coverage of Topics
3 stars 1 forks source link

Bug: Wrong response type for glom #50

Closed RobertMeissner closed 2 years ago

RobertMeissner commented 2 years ago

statt Liste scheint ein String zu kommen, glom failed, bei parse_elastic_hit_to_dict

RobertMeissner commented 2 years ago

Related to collection: 742d8c87-e5a3-4658-86f9-419c2cea6574, "Informatik"

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in call await self.app(scope, receive, _send) File "/usr/local/lib/python3.9/site-packages/starlette_context/middleware/raw_middleware.py", line 96, in call await self.app(scope, receive, send_wrapper) File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in call raise exc File "/usr/local/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in call await self.app(scope, receive, sender) File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 656, in call await route.handle(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 61, in app response = await func(request) File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 226, in app raw_response = await run_endpoint_function( File "/usr/local/lib/python3.9/site-packages/fastapi/routing.py", line 159, in run_endpoint_function return await dependant.call(values) File "/app/app/api/v1/realtime/collections.py", line 94, in filter_collections_with_missing_attributes collections = await crud_collection.get_child_collections_with_missing_attributes( File "/app/app/crud/collection.py", line 183, in get_child_collections_with_missing_attributes return await get_many( File "/app/app/crud/collection.py", line 140, in get_many return [Collection.parse_elastic_hit(hit) for hit in response] File "/app/app/crud/collection.py", line 140, in return [Collection.parse_elastic_hit(hit) for hit in response] File "/app/app/models/collection.py", line 92, in parse_elastic_hit collection = cls.construct(cls.parse_elastic_hit_to_dict(hit)) File "/app/app/models/collection.py", line 87, in parse_elastic_hit_to_dict **glom(hit, spec), File "/usr/local/lib/python3.9/site-packages/glom/core.py", line 2181, in glom raise err glom.core.UnregisteredTarget: error raised while processing, details below. Target-spec trace (most recent last):