HKUDS/nanobot · error · ValueError
Unknown path
Error message
Unknown path
What it means
Error "Unknown path" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/agent/tools/filesystem.py:590
_scopes = {"core", "subagent", "memory"}
@property
def name(self) -> str:
return "write_file"
@property
def description(self) -> str:
return (
"Create a new file or intentionally replace an entire file with "
"the provided content. Overwrites existing files and creates parent "
"directories as needed. For code changes or partial edits, prefer "
"apply_patch; use edit_file only for small exact replacements."
)
async def execute(self, path: str | None = None, content: str | None = None, **kwargs: Any) -> str:
try:
if not path:
raise ValueError("Unknown path")
if content is None:
raise ValueError("Unknown content")
fp = self._resolve_write(path)
fp.parent.mkdir(parents=True, exist_ok=True)
fp.write_text(content, encoding="utf-8")
self._file_states.record_write(fp)
return f"Successfully wrote {len(content)} characters to {fp}"
except PermissionError as e:
return ToolResult.error(f"Error: {e}")
except Exception as e:
return ToolResult.error(f"Error writing file: {e}")
# ---------------------------------------------------------------------------
# edit_file
# ---------------------------------------------------------------------------
_QUOTE_TABLE = str.maketrans({View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/agent/tools/filesystem.py:590 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/e69c35f502523402.
Report an issue: GitHub.