{"record":{"id":"7d0e91cd25c7c6ac","repo":"MemPalace/mempalace","slug":"update-requires-at-least-one-of-documents-metadat-7d0e91","errorCode":null,"errorMessage":"update requires at least one of documents, metadatas, embeddings","messagePattern":"update requires at least one of documents, metadatas, embeddings","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mempalace/backends/chroma.py","lineNumber":1715,"sourceCode":"        }\n        sanitized = self._sanitize_metadatas_for_chromadb(metadatas)\n        if sanitized is not None:\n            kwargs[\"metadatas\"] = sanitized\n        if embeddings is not None:\n            kwargs[\"embeddings\"] = embeddings\n        with self._write_lock():\n            self._collection.upsert(**kwargs)\n\n    def update(\n        self,\n        *,\n        ids,\n        documents=None,\n        metadatas=None,\n        embeddings=None,\n    ):\n        if documents is None and metadatas is None and embeddings is None:\n            raise ValueError(\"update requires at least one of documents, metadatas, embeddings\")\n        kwargs: dict[str, Any] = {\"ids\": ids}\n        if documents is not None:\n            kwargs[\"documents\"] = self._sanitize_documents_for_chromadb(documents)\n        if metadatas is not None:\n            kwargs[\"metadatas\"] = metadatas\n        if embeddings is not None:\n            kwargs[\"embeddings\"] = embeddings\n        with self._write_lock():\n            self._collection.update(**kwargs)\n\n    # ------------------------------------------------------------------\n    # Reads\n    # ------------------------------------------------------------------\n\n    def query(\n        self,\n        *,\n        query_texts=None,","sourceCodeStart":1697,"sourceCodeEnd":1733,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/backends/chroma.py#L1697-L1733","documentation":"An OSError from the local onboarding writer: mempalace.yaml already exists at the project root but is not a regular file (typically a FIFO). Opening a FIFO for writing blocks in the kernel until a reader appears, which would hang `init` with no output, so the code refuses up front.","triggerScenarios":"Running the local setup/init flow when <project_dir>/mempalace.yaml exists as a FIFO, socket, or device file.","commonSituations":"Test fixtures or pranks creating a named pipe called mempalace.yaml; a symlink loop presenting as non-regular; leftover IPC artifacts in the project root.","solutions":["Inspect the path: ls -l <project_dir>/mempalace.yaml and confirm its type.","Remove the offending non-regular file (rm the FIFO) or replace it with a real regular config file.","Re-run the init command."],"exampleFix":"config_path = Path(project_dir).resolve() / 'mempalace.yaml'\nif config_path.exists() and not config_path.is_file():\n    config_path.unlink()  # remove FIFO/named pipe before init\ndetect_rooms_local(project_dir)","handlingStrategy":"validation","validationCode":"from pathlib import Path\ncfg = Path(project_dir).expanduser().resolve() / 'mempalace.yaml'\nif cfg.exists() and not cfg.is_file():\n    raise SystemExit(f'{cfg} is not a regular file; remove it before init')","typeGuard":"def config_path_writable(project_dir: str) -> bool:\n    cfg = Path(project_dir).expanduser().resolve() / 'mempalace.yaml'\n    return not cfg.exists() or cfg.is_file()","tryCatchPattern":null,"preventionTips":["Check for stray FIFOs/named pipes in project roots before automated init runs.","Use ls -l or stat to verify config paths are regular files in scripts that prepare projects."],"tags":["filesystem","fifo","config","init","hang-prevention"],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}