{"record":{"id":"237e7dfbfe79aae0","repo":"HKUDS/DeepTutor","slug":"set-property-needs-a-non-empty-key","errorCode":null,"errorMessage":"set_property needs a non-empty key.","messagePattern":"set_property needs a non-empty key\\.","errorType":"exception","errorClass":"VaultError","httpStatus":null,"severity":"error","filePath":"deeptutor/capabilities/obsidian/vault.py","lineNumber":300,"sourceCode":"    return _rel(root, path)\n\n\ndef append_note(root: Path, ref: str, content: str) -> str:\n    \"\"\"Append text to the end of an existing note.\"\"\"\n    path = resolve_note(root, ref)\n    if path is None:\n        raise VaultError(f\"Note {ref!r} not found; create it first.\")\n    existing = _read_text_exact(path)\n    separator = \"\" if existing.endswith(\"\\n\") or not existing else \"\\n\"\n    path.write_text(existing + separator + (content or \"\"), encoding=\"utf-8\")\n    return _rel(root, path)\n\n\ndef set_property(root: Path, ref: str, key: str, value: Any) -> str:\n    \"\"\"Set a single frontmatter property on an existing note.\"\"\"\n    key = (key or \"\").strip()\n    if not key:\n        raise VaultError(\"set_property needs a non-empty key.\")\n    path = resolve_note(root, ref)\n    if path is None:\n        raise VaultError(f\"Note {ref!r} not found; create it first.\")\n    frontmatter, body = split_frontmatter(_read_text_exact(path))\n    frontmatter[key] = value\n    path.write_text(_compose_note(frontmatter, body), encoding=\"utf-8\")\n    return _rel(root, path)\n\n\n__all__ = [\n    \"VaultError\",\n    \"IGNORED_DIRS\",\n    \"resolve_note\",\n    \"read_note\",\n    \"search_notes\",\n    \"list_notes\",\n    \"outgoing_links\",\n    \"backlinks\",","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/capabilities/obsidian/vault.py#L282-L318","documentation":"Error \"set_property needs a non-empty key.\" thrown in HKUDS/DeepTutor.","triggerScenarios":"Thrown at deeptutor/capabilities/obsidian/vault.py:300 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":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}