{"record":{"id":"aeb8663f17503055","repo":"Comfy-Org/ComfyUI","slug":"no-base-path-configured-for-category-folder-name","errorCode":null,"errorMessage":"no base path configured for category '{folder_name}'","messagePattern":"no base path configured for category '(.+?)'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"app/assets/services/path_utils.py","lineNumber":58,"sourceCode":"        raise ValueError(\"uploads require exactly one destination role: input, models, or output\")\n\n    root = destination_roles[0]\n    if root == \"models\":\n        model_type_tags = [t for t in tags if t.startswith(\"model_type:\")]\n        if len(model_type_tags) != 1:\n            raise ValueError(\"models uploads require exactly one model_type:<folder_name> tag\")\n        folder_name = model_type_tags[0].split(\":\", 1)[1]\n        if not folder_name:\n            raise ValueError(\"models uploads require exactly one model_type:<folder_name> tag\")\n        model_folder_paths = {\n            name: paths for name, paths, _exts in get_comfy_models_folders()\n        }\n        try:\n            bases = model_folder_paths[folder_name]\n        except KeyError:\n            raise ValueError(f\"unknown model category '{folder_name}'\")\n        if not bases:\n            raise ValueError(f\"no base path configured for category '{folder_name}'\")\n        base_dir = os.path.abspath(bases[0])\n    elif root == \"input\":\n        base_dir = os.path.abspath(folder_paths.get_input_directory())\n    else:\n        base_dir = os.path.abspath(folder_paths.get_output_directory())\n\n    return base_dir, []\n\n\ndef validate_path_within_base(candidate: str, base: str) -> None:\n    cand_abs = Path(os.path.abspath(candidate))\n    base_abs = Path(os.path.abspath(base))\n    if not cand_abs.is_relative_to(base_abs):\n        raise ValueError(\"destination escapes base directory\")\n\n\ndef _compute_relative_path(child: str, parent: str) -> str:\n    rel = os.path.relpath(os.path.abspath(child), os.path.abspath(parent))","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/app/assets/services/path_utils.py#L40-L76","documentation":"Raised when the requested model category IS registered, but its configured base-path list is empty (bases == []), so there is no directory to write into. The folder name resolves via get_comfy_models_folders(), yet the corresponding entry carries zero usable paths — a server configuration gap rather than a bad request. ValueError propagates as an upload failure.","triggerScenarios":"extra_model_paths.yaml (or folder_paths config) declares a model folder name but with an empty/invalid path list (directory doesn't exist, unreadable, or entry defined with no paths); an upload tagged model_type:<that-folder> then hits the `if not bases` branch.","commonSituations":"Fresh ComfyUI installs where a category exists by name but its directory hasn't been created/linked; misconfigured extra_model_paths.yaml with a stale or misspelled filesystem path; containers/volumes where the models mount is missing.","solutions":["Fix the server-side folder configuration: give the category a real, existing directory in extra_model_paths.yaml (or the relevant folder_paths registration) and restart the server.","Verify the directory exists on disk and the server process can read/write it.","As a workaround, upload into a category that does have a configured base, or use the 'input' role and move the file manually."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# server-side precheck before accepting model uploads\nfolders = {n: ps for n, ps, _ in get_comfy_models_folders()}\nif not folders.get(category):\n    raise ConfigurationError(f'category {category!r} has no base path; fix folder config')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify every registered model folder has at least one existing, writable path before enabling uploads","Health-check the folder registry at startup","Keep extra_model_paths.yaml paths absolute and existing; test after volume remounts"],"tags":["upload","models","configuration","server-setup"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}