Troubleshooting#
This page lists common errors you may encounter when using jamb, organized by source. Each entry includes the error message, its cause, and how to fix it.
Validation Errors#
These errors and warnings are reported by jamb validate.
Link Issues#
- “links to non-existent item: <UID>”
An item references a UID that does not exist in any document.
Fix: Check for typos in the link UID. Run
jamb item listto see valid UIDs, then update the link withjamb link removeandjamb link add.- “links to inactive item: <UID>”
An item links to a target that has
active: false.Fix: Either reactivate the target item by setting
active: truein its YAML file, or remove the link withjamb link remove.- “links to non-normative item: <UID>”
An item links to a target whose type is not
requirement(e.g.,infoorheading).Fix: Change the target item’s type to
requirement, or remove the link if it was unintentional.- “links to itself”
An item has its own UID in its
linkslist.Fix: Remove the self-referencing link with
jamb link remove <UID> <UID>.- “links to <UID> in document <PREFIX>, which is not a parent document (expected: <PARENTS>)”
An item links to a target in a document that is not a parent of the item’s document in the DAG.
Fix: Ensure the link points to an item in a valid parent document. If you need a cross-hierarchy link, adjust the document DAG with
jamb doc createto add the target document as a parent.
Suspect Links#
- “suspect link to <UID> (content may have changed; run ‘jamb review clear’ to re-verify)”
The content hash stored in the link no longer matches the current content of the target item. The target was modified after the link was last verified.
Fix: Review the change to the target item, then clear the suspect status:
jamb review clear <CHILD_UID> <PARENT_UID>
- “link to <UID> has no stored hash (run ‘jamb review clear’ to verify links)”
A link exists but has no content hash recorded, so jamb cannot verify whether the target has changed.
Fix: Run
jamb review clear <UID>to compute and store hashes for all links on the item.
Review Status#
- “has not been reviewed (run ‘jamb review mark’ to mark as reviewed)”
A normative item has never been marked as reviewed.
Fix: Review the item content and mark it:
jamb review mark <UID>
- “has been modified since last review (run ‘jamb review mark’ to re-approve)”
An item’s content has changed since it was last reviewed (the stored review hash no longer matches).
Fix: Re-review the item and mark it again:
jamb review mark <UID>
Document Structure#
- “has no children linking to it from child documents”
A normative item in a non-leaf document has no items in child documents linking to it. This may indicate incomplete decomposition.
Fix: Create child items that link to this item, or skip the check with
jamb validate -C.- “document contains no items”
A document directory exists but contains no item YAML files.
Fix: Add items with
jamb item add <PREFIX>, or remove the empty document withjamb doc delete <PREFIX>.- “has empty text”
An active item has no text content (empty string or whitespace only).
Fix: Edit the item to add text:
jamb item edit <UID>.- “normative non-derived item has no links to parent document (add links or set ‘derived: true’ to suppress)”
An active requirement in a child document has no links to any parent document.
Fix: Add a link to a parent item with
jamb link add <UID> <PARENT_UID>, or setderived: truein the item’s YAML file if the requirement intentionally has no parent.- “cycle in item links: <UID> -> … -> <UID>”
A cycle was detected in the item link graph (items form a circular dependency).
Fix: Remove one of the links in the cycle with
jamb link removeto break the loop.- “Cycle detected among documents: <PREFIXES>”
The document hierarchy contains a cycle (e.g., document A is a parent of B and B is a parent of A).
Fix: Recreate one of the documents with corrected parent relationships using
jamb doc deleteandjamb doc create.- “non-normative item has links”
An item with type
infoorheadinghas links to parent items. Onlyrequirementitems should have traceability links.Fix: Either change the item type to
requirementor remove its links.
CLI Errors#
These errors are printed by jamb commands.
- “Error: Document ‘<PREFIX>’ not found”
The specified document prefix does not exist in the project.
Fix: Run
jamb doc listto see available documents. Check for typos or create the document withjamb doc create.- “Error: Item ‘<UID>’ not found”
The specified item UID does not exist.
Fix: Run
jamb item listto see available items. Check for typos in the UID.- “Error: –after and –before are mutually exclusive”
Both
--afterand--beforewere passed tojamb item add.Fix: Use only one of
--afteror--before.- “Error: –html requires an output PATH” / “–markdown requires an output PATH” / “–docx requires an output PATH”
A format flag was used with
jamb publishbut no output path was provided.Fix: Provide an output path, e.g.
jamb publish SRS output.html --html.- “Error: ‘all’ requires an output PATH”
jamb publish allwas called without a format flag or output path.Fix: Provide both a path and format, e.g.
jamb publish all docs/all.html --html.- “Error: –neighbors requires –items to be specified”
The
--neighborsflag was used withjamb exportwithout specifying--items.Fix: Add
--itemsto specify which items to include neighbors for.
Test Reference Issues#
These issues relate to @pytest.mark.requirement() decorators in test files.
- “Unknown items referenced in tests: SRS001, SRS002”
Test files reference requirement UIDs that don’t exist in your documents. This can happen when:
Requirements were deleted but tests weren’t updated
Typos in requirement UIDs
Requirements were reordered without updating tests
Fix: Update your test files to use valid UIDs. Run
jamb checkto see which UIDs are referenced.- “WARNING: SRS001 is referenced by N test(s)”
When removing an item with
jamb item remove, jamb warns you that tests reference this item.Fix: Proceed with removal if intended, then update your test files to remove the orphaned references. Use
--forceto skip the confirmation prompt.- Orphaned test references after reorder
If you used
jamb reorder --no-update-tests, test files may reference old UIDs that no longer exist.Fix: Either:
Re-run reorder without
--no-update-teststo let jamb update test files automaticallyManually update the
@pytest.mark.requirement()decorators in your test files
- “Cannot reorder - orphaned test references would collide with renamed UIDs”
When running
jamb reorder, orphaned test references (references to deleted items) would collide with renamed UIDs. For example, if you deleted SRS003 but left orphaned test references, then reordering would rename SRS004 → SRS003, creating ambiguity.Fix: Run
jamb reorder <PREFIX> --clean-orphansto automatically remove orphaned references before reordering. Alternatively, manually update test files to remove orphaned references, then re-run the reorder.
pytest Integration Errors#
These errors occur when running pytest --jamb.
- “Cannot run with –jamb: requirement graph failed to load. Check earlier warnings for details.”
The requirement documents could not be loaded. This typically happens when:
No
reqs/directory exists (runjamb initfirst)Document
.jamb.ymlfiles are malformed or missingYAML syntax errors in item files
Fix: Check the warning messages above this error for the specific cause. Common fixes:
# Initialize a new project if not already done jamb init # Validate your documents to find issues jamb validate # Check document structure jamb info
Configuration Errors#
These errors come from loading .jamb.yml document config files.
- “Invalid config file: <path>”
The
.jamb.ymlfile is missing or does not contain asettingskey.Fix: Ensure the file exists and contains a valid
settingssection. Recreate the document withjamb doc createif needed.- “Config file missing ‘prefix’: <path>”
The
.jamb.ymlfile has asettingssection but noprefixfield.Fix: Add a
prefixfield to thesettingssection in.jamb.yml, or recreate the document withjamb doc create.
Import Errors#
These errors come from jamb import.
- “YAML file must contain a mapping”
The import file is not a YAML mapping (dictionary). It may be a list, a scalar, or invalid YAML.
Fix: Ensure the file starts with
documents:and/oritems:top-level keys. Runjamb import --templatefor a valid example.- “Document missing ‘prefix’: …” / “Document missing ‘path’: …”
A document entry in the import file is missing a required field.
Fix: Add the missing
prefixorpathfield to the document entry.- “Item missing ‘uid’: …” / “Item missing ‘text’: …”
An item entry in the import file is missing a required field.
Fix: Add the missing
uidortextfield to the item entry.- “Duplicate UIDs in import file: <UIDs>”
The import file contains multiple items with the same UID.
Fix: Remove or rename duplicate entries so each UID is unique.
Matrix Generation Warnings#
These warnings are reported when generating traceability or test records matrices.
- “Orphaned items in coverage not found in graph: [‘SRS001’, ‘SRS002’] and N more”
The
.jambcoverage file contains items that no longer exist in your requirement documents. This can happen when:Requirements were deleted after running tests
Item UIDs were renamed
The wrong
.jambfile is being used
Fix: Regenerate the coverage file by running
pytest --jambagain.- “trace_from ‘XXX’ not found in documents”
The
trace_fromconfiguration option references a document prefix that doesn’t exist in your project.Fix: Check your
pyproject.tomland ensuretrace_frommatches one of your document prefixes (e.g., UN, SYS, SRS). Runjamb doc listto see available documents.- “Large dataset warning: N rows. Consider using CSV format for better performance.”
The matrix being generated contains more than 5,000 rows. HTML and XLSX formats may be slow to generate and consume significant memory for large datasets.
Fix: Use a
.csvextension for large matrices (e.g.,--jamb-trace-matrix matrix.csv), or usejamb matrix output.csvto generate CSV format.