odysseus-dev/odysseus · error · HTTPException

PDF fill failed: {e}

Error message

PDF fill failed: {e}

What it means

Error "PDF fill failed: {e}" thrown in odysseus-dev/odysseus.

Source

Thrown at routes/document/document_routes.py:1558

                rows = _sig_q2.all()
                by_id = {s.id: s for s in rows}
                for field_name, sid in sig_ids.items():
                    s = by_id.get(sid)
                    if not s:
                        continue
                    try:
                        stamps[field_name] = base64.b64decode(s.data_png)
                    except Exception as e:
                        logger.warning(f"Bad signature data for {sid}: {e}")

            filled_path = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False).name
            _to_unlink.append(filled_path)
            try:
                fill_fields(pdf_path, filled_path, text_values)
            except Exception as e:
                logger.error(f"fill_fields failed for doc {doc_id}: {e}")
                _cleanup_temps()
                raise HTTPException(500, f"PDF fill failed: {e}")

            out_path = filled_path
            if stamps:
                stamped_path = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False).name
                _to_unlink.append(stamped_path)
                try:
                    stamp_signatures(filled_path, stamped_path, stamps)
                    out_path = stamped_path
                except Exception as e:
                    logger.error(f"stamp_signatures failed for doc {doc_id}: {e}")

            # Burn freeform annotations (Text/Check/Sign drops) on top.
            annotations = parse_markdown_annotations(doc.current_content or "")
            if annotations:
                # Resolve any signature annotations to their PNG bytes.
                ann_sig_ids = [
                    a["value"][len("signature:"):].strip()
                    for a in annotations

View on GitHub (pinned to f9235ebbf1)

Solutions

  1. Check the server logs for the detailed PDF fill error.
  2. Verify the PDF field schema matches the values being filled, then retry.

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14). Data as JSON: /api/errors/8b104b223788482a. Report an issue: GitHub.