{"record":{"id":"b1d0b260a2251eee","repo":"HKUDS/Vibe-Trading","slug":"shadow-profile-not-found-shadow-id","errorCode":null,"errorMessage":"Shadow profile not found: {shadow_id}","messagePattern":"Shadow profile not found: (.+?)","errorType":"http","errorClass":"FileNotFoundError","httpStatus":404,"severity":"error","filePath":"agent/src/shadow_account/storage.py","lineNumber":85,"sourceCode":"def save_profile(profile: ShadowProfile) -> Path:\n    \"\"\"Persist a ShadowProfile to disk as JSON.\"\"\"\n    path = profiles_dir() / f\"{profile.shadow_id}.json\"\n    path.write_text(\n        json.dumps(profile.to_dict(), ensure_ascii=False, indent=2, default=str),\n        encoding=\"utf-8\",\n    )\n    return path\n\n\ndef load_profile(shadow_id: str) -> ShadowProfile:\n    \"\"\"Load a ShadowProfile back from disk.\n\n    Raises:\n        FileNotFoundError: No profile with that id.\n    \"\"\"\n    path = profiles_dir() / f\"{shadow_id}.json\"\n    if not path.exists():\n        raise FileNotFoundError(f\"Shadow profile not found: {shadow_id}\")\n    data: dict[str, Any] = json.loads(path.read_text(encoding=\"utf-8\"))\n    rules = tuple(\n        ShadowRule(\n            rule_id=r[\"rule_id\"],\n            human_text=r[\"human_text\"],\n            entry_condition=r[\"entry_condition\"],\n            exit_condition=r[\"exit_condition\"],\n            holding_days_range=tuple(r[\"holding_days_range\"]),\n            support_count=r[\"support_count\"],\n            coverage_rate=r[\"coverage_rate\"],\n            sample_trades=tuple(r[\"sample_trades\"]),\n            weight=r.get(\"weight\", 1.0),\n        )\n        for r in data[\"rules\"]\n    )\n    return ShadowProfile(\n        shadow_id=data[\"shadow_id\"],\n        created_at=data[\"created_at\"],","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/shadow_account/storage.py#L67-L103","documentation":"Error \"Shadow profile not found: {shadow_id}\" thrown in HKUDS/Vibe-Trading.","triggerScenarios":"Thrown at agent/src/shadow_account/storage.py:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}