MemPalace/mempalace · error · ValueError
project_dirs was provided but is empty; pass at least one pr
Error message
project_dirs was provided but is empty; pass at least one project root or pass project_dirs=None to auto-detect from drawer metadata
What it means
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.
Source
Thrown at mempalace/sync.py:231
Returns a SyncReport with bucket counts. Dry-run by default; pass
dry_run=False to actually delete drawers and matching closets.
Holds ``mine_palace_lock`` for the whole call so the classify pass and
the apply branch see the same drawer snapshot. Raises
``MineAlreadyRunning`` if another mine is in progress on this palace.
On apply (``dry_run=False``), at least one of ``wing`` or
``project_dirs`` must be set so a caller cannot accidentally prune
every wing in a multi-project palace via auto-detected roots.
"""
if not dry_run and not wing and not project_dirs:
raise ValueError(
"sync apply requires explicit wing= or project_dirs= so it cannot "
"auto-prune every wing in a multi-project palace; pass --wing or "
"a project directory"
)
if project_dirs is not None and not project_dirs:
raise ValueError(
"project_dirs was provided but is empty; pass at least one project "
"root or pass project_dirs=None to auto-detect from drawer metadata"
)
counts = {
"scanned": 0,
"kept": 0,
"gitignored": 0,
"missing": 0,
"no_source": 0,
"out_of_scope": 0,
}
by_source: dict = defaultdict(int)
removable_ids: list = []
removable_sources: set = set()
with mine_palace_lock(palace_path):
col = get_collection(palace_path, create=False)View on GitHub (pinned to 06cb6987f0)
Solutions
- Pass at least one project root, or pass project_dirs=None to auto-detect
When it happens
Trigger: Thrown at mempalace/sync.py:231 when the library encounters an invalid state.
Common situations: project_dirs was given as an empty list.
AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15).
Data as JSON: /api/errors/d9c90c90a9b0ee2f.
Report an issue: GitHub.