{"record":{"id":"8b104b223788482a","repo":"odysseus-dev/odysseus","slug":"pdf-fill-failed-e","errorCode":null,"errorMessage":"PDF fill failed: {e}","messagePattern":"PDF fill failed: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"routes/document/document_routes.py","lineNumber":1558,"sourceCode":"                rows = _sig_q2.all()\n                by_id = {s.id: s for s in rows}\n                for field_name, sid in sig_ids.items():\n                    s = by_id.get(sid)\n                    if not s:\n                        continue\n                    try:\n                        stamps[field_name] = base64.b64decode(s.data_png)\n                    except Exception as e:\n                        logger.warning(f\"Bad signature data for {sid}: {e}\")\n\n            filled_path = tempfile.NamedTemporaryFile(suffix=\".pdf\", delete=False).name\n            _to_unlink.append(filled_path)\n            try:\n                fill_fields(pdf_path, filled_path, text_values)\n            except Exception as e:\n                logger.error(f\"fill_fields failed for doc {doc_id}: {e}\")\n                _cleanup_temps()\n                raise HTTPException(500, f\"PDF fill failed: {e}\")\n\n            out_path = filled_path\n            if stamps:\n                stamped_path = tempfile.NamedTemporaryFile(suffix=\".pdf\", delete=False).name\n                _to_unlink.append(stamped_path)\n                try:\n                    stamp_signatures(filled_path, stamped_path, stamps)\n                    out_path = stamped_path\n                except Exception as e:\n                    logger.error(f\"stamp_signatures failed for doc {doc_id}: {e}\")\n\n            # Burn freeform annotations (Text/Check/Sign drops) on top.\n            annotations = parse_markdown_annotations(doc.current_content or \"\")\n            if annotations:\n                # Resolve any signature annotations to their PNG bytes.\n                ann_sig_ids = [\n                    a[\"value\"][len(\"signature:\"):].strip()\n                    for a in annotations","sourceCodeStart":1540,"sourceCodeEnd":1576,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/routes/document/document_routes.py#L1540-L1576","documentation":"Error \"PDF fill failed: {e}\" thrown in odysseus-dev/odysseus.","triggerScenarios":"Triggered when the corresponding server-side validation or runtime check at the recorded location rejects the request or operation and returns this error message to the caller.","commonSituations":"See trigger scenarios.","solutions":["Check the server logs for the detailed PDF fill error.","Verify the PDF field schema matches the values being filled, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}