{"record":{"id":"02a2710ece4c2416","repo":"BerriAI/litellm","slug":"prompt-directory-does-not-exist-self-prompt-dire","errorCode":null,"errorMessage":"Prompt directory does not exist: {self.prompt_directory}","messagePattern":"Prompt directory does not exist: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/dotprompt/prompt_manager.py","lineNumber":96,"sourceCode":"        # Load prompts from directory if provided\n        if self.prompt_directory:\n            self._load_prompts()\n\n        if self.prompt_file:\n            if not prompt_id:\n                raise ValueError(\"prompt_id is required when prompt_file is provided\")\n\n            template: Final = self._load_prompt_file(self.prompt_file, prompt_id)\n            self.prompts[prompt_id] = template\n\n        # Load prompts from JSON data if provided\n        if prompt_data:\n            self._load_prompts_from_json(prompt_data, prompt_id)\n\n    def _load_prompts(self) -> None:\n        \"\"\"Load all .prompt files from the prompt directory.\"\"\"\n        if not self.prompt_directory or not self.prompt_directory.exists():\n            raise ValueError(f\"Prompt directory does not exist: {self.prompt_directory}\")\n\n        prompt_files: Final = list(self.prompt_directory.glob(\"*.prompt\"))\n\n        for prompt_file in prompt_files:\n            try:\n                prompt_id = prompt_file.stem  # filename without extension\n                template = self._load_prompt_file(prompt_file, prompt_id)\n                self.prompts[prompt_id] = template\n                # Optional: print(f\"Loaded prompt: {prompt_id}\")\n            except Exception:\n                # Optional: print(f\"Error loading prompt file {prompt_file}\")\n                pass\n\n    def _load_prompts_from_json(self, prompt_data: dict[str, dict[str, Any]], prompt_id: str | None = None) -> None:\n        \"\"\"Load prompts from JSON data structure.\n\n        Expected format:\n        {","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/dotprompt/prompt_manager.py#L78-L114","documentation":"Error \"Prompt directory does not exist: {self.prompt_directory}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/integrations/dotprompt/prompt_manager.py:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the prompt directory or correct the prompt_directory path."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}