Colton Flowers
06/25/2026, 3:15 PM{
"type": "PydanticSerializationError",
"message": "Unable to serialize unknown type: <class 'uuid.UUID'>",
"traceback": " File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/engine.py\", line 87, in handle_engine_signals\n yield\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/engine.py\", line 178, in <module>\n _run_result: object = run_flow(\n ^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/flow_engine.py\", line 2193, in run_flow\n ret_val = run_flow_sync(**kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/flow_engine.py\", line 2033, in run_flow_sync\n with engine.start():\n ^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.12/contextlib.py\", line 137, in __enter__\n return next(self.gen)\n ^^^^^^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/flow_engine.py\", line 1269, in start\n self.begin_run()\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/flow_engine.py\", line 729, in begin_run\n state = self.set_state(new_state)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/flow_engine.py\", line 741, in set_state\n state = propose_state_sync(\n ^^^^^^^^^^^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/utilities/engine/__init__.py\", line 640, in propose_state_sync\n response = set_state_and_handle_waits(set_state)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/utilities/engine/__init__.py\", line 626, in set_state_and_handle_waits\n response = set_state_func()\n ^^^^^^^^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/prefect/client/orchestration/_flow_runs/client.py\", line 403, in set_flow_run_state\n state=state_create.model_dump(mode=\"json\", serialize_as_any=True),\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/prefect/src/category/prefect/_state_serialization_capture.py\", line 69, in model_dump\n return original(self, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/opt/prefect/src/.venv/lib/python3.12/site-packages/pydantic/main.py\", line 463, in model_dump\n return self.__pydantic_serializer__.to_python(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"
}Marvin
06/25/2026, 3:15 PMMarvin
06/25/2026, 3:19 PMSubmitting)
- During that state update, Prefect/Pydantic fails to JSON-serialize a UUID
- Because the state transition fails, the run can appear stuck on Submitting in the UI
The key part of your traceback is this:
state=state_create.model_dump(mode="json", serialize_as_any=True)
and the error:
Unable to serialize unknown type: <class 'uuid.UUID'>
Most likely cause
This matches a known Prefect 3.x serialization issue affecting some 3.6.x versions. The fix was added in Prefect 3.6.10+.
What to do first
1. Check your Prefect version:
bash
prefect version
2. If you're on an older 3.6.x release, upgrade:
bash
pip install -U "prefect>=3.6.10"
If you can, I'd recommend upgrading to the latest 3.x rather than stopping at 3.6.10.
Temporary workaround if you cannot upgrade immediately
Add this before your worker/flow process starts:
python
from prefect.client.schemas.objects import StateDetails
StateDetails.model_rebuild()
This forces Pydantic to build the serializer up front and can avoid the UUID serialization failure.
Why the UI says “Submitting”
The worker has picked up the run, but it crashes while reporting the state transition back to the Prefect API. So the orchestration state in UI never advances correctly.
Helpful links
- Prefect 3.6.10 release notes
- Related GitHub issue
If upgrading does not fix it
Please share:
- output of prefect version
- worker type you’re using
- how you launch the worker
- whether this happens for all flows or only one specific deployment
Then I can help narrow down whether this is version-related or something specific in your environment.Colton Flowers
06/25/2026, 3:22 PMNate
06/25/2026, 6:18 PM"message":"Unable to serialize unknown type: <class 'uuid.UUID'>"
Nate
06/25/2026, 6:18 PMColton Flowers
06/25/2026, 6:23 PMddtrace-run , i.e. replaced ddtrace-run prefect flow-run execute with prefect flow-run execute .Nate
06/25/2026, 6:24 PMNate
06/25/2026, 6:24 PMNate
06/25/2026, 6:25 PMNate
06/25/2026, 6:29 PMColton Flowers
06/25/2026, 6:29 PM