GET `/camera/camera_configuration` returns an error
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start at the GET /camera/camera_configuration endpoint and inspect how its response is assembled and serialized by FastAPI and Pydantic. Reproduce the request, then trace the libcamera._libcamera.Transform value shown in the traceback. Done means the endpoint returns a successfully serialized camera configuration instead of a 500 error.
Written by the indexing model from the issue text.
Description
Terminal log:
INFO: 192.168.178.28:49834 - "GET /camera/camera_configuration HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in __call__
await self.middleware_stack(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
raise exc
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
await self.app(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
await self.middleware_stack(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 327, in app
content = await serialize_response(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 181, in serialize_response
return field.serialize(
^^^^^^^^^^^^^^^^
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/fastapi/_compat.py", line 150, in serialize
return self._type_adapter.dump_python(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/pydantic/type_adapter.py", line 135, in wrapped
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/openflexure/application/openflexure-microscope-server/.venv/lib/python3.11/site-packages/pydantic/type_adapter.py", line 451, in dump_python
return self.serializer.to_python(
^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.PydanticSerializationError: Unable to serialize unknown type: <class 'libcamera._libcamera.Transform'>
- Dominant language
- Python
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from labthings/labthings-picamera2
-
Difficulty 3/5 1-2 days Newbie friendliness 40/100
-
capture_jpeg() has no quality factorPossibly taken @JohemianKnapsody claimed this 637 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
labthings/labthings-picamera2#16 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
labthings/labthings-picamera2#6 · 1 comment ·
All issues in labthings/labthings-picamera2
Similar issues
-
bug feature request
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Qiskit/qiskit-obp#156 ·
-
action-item enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
getcommunityone/open-navigator#1658 ·
Maintainers usually reply within 1 day
-
review-panel severity:low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kristovatlas/coin-accounting#636 ·
Maintainers usually reply within 1 day