{"record":{"id":"ebc1eaf56d12f984","repo":"Graphify-Labs/graphify","slug":"cargo-on-python-3-10-needs-tomli-install-with","errorCode":null,"errorMessage":"--cargo on Python 3.10 needs tomli. Install with: pip install tomli","messagePattern":"--cargo on Python 3\\.10 needs tomli\\. Install with: pip install tomli","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"graphify/cargo_introspect.py","lineNumber":19,"sourceCode":"\"\"\"Cargo manifest introspection for workspace-internal crate dependencies.\"\"\"\n\nfrom __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import Any\n\n\n_CONFIDENCE_EXTRACTED = \"EXTRACTED\"\n\n\ndef _load_toml(path: Path) -> dict[str, Any]:\n    try:\n        import tomllib  # type: ignore[import-not-found]\n    except ModuleNotFoundError:\n        try:\n            import tomli as tomllib  # type: ignore[import-not-found,no-redef]\n        except ModuleNotFoundError:\n            raise ImportError(\n                \"--cargo on Python 3.10 needs tomli. Install with: pip install tomli\"\n            ) from None\n\n    with path.open(\"rb\") as manifest:\n        return tomllib.load(manifest)\n\n\ndef _member_manifest_paths(root: Path, root_data: dict[str, Any]) -> list[Path]:\n    paths: list[Path] = []\n    if isinstance(root_data.get(\"package\"), dict):\n        paths.append(root / \"Cargo.toml\")\n\n    workspace = root_data.get(\"workspace\")\n    members = workspace.get(\"members\", []) if isinstance(workspace, dict) else []\n    if not isinstance(members, list):\n        return paths\n\n    for pattern in members:","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/Graphify-Labs/graphify/blob/7fe58b0b0f3873be9a21c30106b8b8527c353aa6/graphify/cargo_introspect.py#L1-L37","documentation":"Empty-graph fail-fast in the devin-flavored fragment (tools/skillgen/fragments/core/devin.md:477). It loads graphify-out/-prefixed sidecars, builds the graph with build_from_json(extraction, directed=IS_DIRECTED) (no root= parameter in this variant), and exits 1 when the graph has zero nodes before cluster/export/report run (#1392).","triggerScenarios":"G.number_of_nodes() == 0 right after build: the extraction JSON's nodes list is empty because all files were skipped, the corpus is binary-only, or extraction failed upstream while still writing sidecars.","commonSituations":"Running the devin workflow on a docs/asset folder with no code; over-broad skip rules; extraction API silently degraded; stale empty .graphify_extract.json left from a failed run.","solutions":["Verify graphify-out/.graphify_extract.json has a non-empty nodes array; re-run extraction otherwise.","Inspect .graphify_detect.json for the skip list and correct detection rules or the input path.","Delete stale extract/detect sidecars and re-run the full pipeline.","Confirm the extraction stage actually succeeded (tokens, logs) before the build step."],"exampleFix":"# before\n/graphify ./vendor-libs\n# ERROR: Graph is empty ...\n\n# after\nrm graphify-out/.graphify_extract.json graphify-out/.graphify_detect.json\n/graphify ./src","handlingStrategy":"validation","validationCode":"import json\nfrom pathlib import Path\n\nextract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding='utf-8'))\nif not (extract.get('nodes') or []):\n    raise SystemExit('0 nodes extracted - fix corpus/skip rules before build')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the extract sidecar is non-empty before the devin build step.","Target source trees with extractable text, not asset folders.","Check detection skip rules when extraction returns nothing.","Remove stale sidecars before re-running."],"tags":["graphify","devin","empty-graph","fail-fast","extraction"],"backgroundTag":null,"analyzedSha":"7fe58b0b0f3873be9a21c30106b8b8527c353aa6","analyzedAt":"2026-08-14T19:23:21.323Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}