{"record":{"id":"d9c90c90a9b0ee2f","repo":"MemPalace/mempalace","slug":"project-dirs-was-provided-but-is-empty-pass-at-le","errorCode":null,"errorMessage":"project_dirs was provided but is empty; pass at least one project root or pass project_dirs=None to auto-detect from drawer metadata","messagePattern":"project_dirs was provided but is empty; pass at least one project root or pass project_dirs=None to auto-detect from drawer metadata","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mempalace/sync.py","lineNumber":231,"sourceCode":"    Returns a SyncReport with bucket counts. Dry-run by default; pass\n    dry_run=False to actually delete drawers and matching closets.\n\n    Holds ``mine_palace_lock`` for the whole call so the classify pass and\n    the apply branch see the same drawer snapshot. Raises\n    ``MineAlreadyRunning`` if another mine is in progress on this palace.\n\n    On apply (``dry_run=False``), at least one of ``wing`` or\n    ``project_dirs`` must be set so a caller cannot accidentally prune\n    every wing in a multi-project palace via auto-detected roots.\n    \"\"\"\n    if not dry_run and not wing and not project_dirs:\n        raise ValueError(\n            \"sync apply requires explicit wing= or project_dirs= so it cannot \"\n            \"auto-prune every wing in a multi-project palace; pass --wing or \"\n            \"a project directory\"\n        )\n    if project_dirs is not None and not project_dirs:\n        raise ValueError(\n            \"project_dirs was provided but is empty; pass at least one project \"\n            \"root or pass project_dirs=None to auto-detect from drawer metadata\"\n        )\n\n    counts = {\n        \"scanned\": 0,\n        \"kept\": 0,\n        \"gitignored\": 0,\n        \"missing\": 0,\n        \"no_source\": 0,\n        \"out_of_scope\": 0,\n    }\n    by_source: dict = defaultdict(int)\n    removable_ids: list = []\n    removable_sources: set = set()\n\n    with mine_palace_lock(palace_path):\n        col = get_collection(palace_path, create=False)","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/sync.py#L213-L249","documentation":"Error \"project_dirs was provided but is empty; pass at least one project root or pass project_dirs=None to auto-detect from drawer metadata\" thrown in MemPalace/mempalace.","triggerScenarios":"Thrown at mempalace/sync.py:231 when the library encounters an invalid state.","commonSituations":"project_dirs was given as an empty list.","solutions":["Pass at least one project root, or pass project_dirs=None to auto-detect"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}