{"record":{"id":"98fc9d211d767afe","repo":"crewAIInc/crewAI","slug":"project-name-is-required-to-create-a-zip-deploymen","errorCode":null,"errorMessage":"project_name is required to create a ZIP deployment","messagePattern":"project_name is required to create a ZIP deployment","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"lib/cli/src/crewai_cli/deploy/main.py","lineNumber":461,"sourceCode":"            console.print(\n                \"Could not create an initial Git commit. \"\n                \"Continuing with ZIP deployment using Git file listing.\",\n                style=\"yellow\",\n            )\n            console.print(str(commit_error), style=\"dim\")\n            return repository\n\n        return repository\n\n    def _create_crew_from_zip(\n        self,\n        env_vars: dict[str, str],\n        repository: git.Repository | None,\n        confirm: bool,\n    ) -> Any:\n        \"\"\"Create a deployment by uploading a project ZIP archive.\"\"\"\n        if not self.project_name:\n            raise ValueError(\"project_name is required to create a ZIP deployment\")\n\n        console.print(\"Preparing project ZIP...\", style=\"bold blue\")\n        zip_file_path = create_project_zip(self.project_name, repository=repository)\n        try:\n            self._confirm_zip_input(env_vars, confirm)\n            console.print(\"Uploading project ZIP...\", style=\"bold blue\")\n            return self.plus_api_client.create_crew_from_zip(\n                zip_file_path,\n                name=self.project_name,\n                env=env_vars,\n            )\n        finally:\n            zip_file_path.unlink(missing_ok=True)\n\n    def _update_crew_from_zip(\n        self,\n        uuid: str,\n        repository: git.Repository | None,","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/cli/src/crewai_cli/deploy/main.py#L443-L479","documentation":"Raised by the project-config loader when [tool.crewai].definition is a string but strips to empty (only whitespace). The loader normalizes then rejects empty definitions with ProjectDefinitionError, since an empty path cannot resolve to a project definition file.","triggerScenarios":"pyproject.toml contains definition = \"\" or definition = \"   \" (whitespace-only) under [tool.crewai] while the type matches the requested project type.","commonSituations":"Placeholder value committed during scaffolding, template left with empty quotes, or automated config generation writing an empty string.","solutions":["Set definition to the real project-local path of your definition file (e.g. \"src/my_project/definitions.py\")","If the key is not needed yet, remove the definition key entirely — the loader returns None when it is absent","Ensure the path is project-local and resolvable from the project root","Re-run the loader to verify resolution succeeds"],"exampleFix":"# before\n[tool.crewai]\ntype = \"crew\"\ndefinition = \"\"\n\n# after\n[tool.crewai]\ntype = \"crew\"\ndefinition = \"src/my_project/definitions.py\"","handlingStrategy":"validation","validationCode":"import tomllib\n\nwith open(\"pyproject.toml\", \"rb\") as f:\n    data = tomllib.load(f)\ndefn = data.get(\"tool\", {}).get(\"crewai\", {}).get(\"definition\")\nassert defn is None or defn.strip(), \"[tool.crewai].definition must be a non-empty path\"","typeGuard":null,"tryCatchPattern":"from crewai_core.project import ProjectDefinitionError\n\ntry:\n    path = load_project_definition(project_root=\".\")\nexcept ProjectDefinitionError as e:\n    raise SystemExit(f\"Invalid pyproject.toml: {e}\") from e","preventionTips":["Remove the definition key entirely if unused — absent is valid, empty is not","Fail scaffolding templates on empty definition placeholders","Test config parsing in CI with representative pyproject.toml fixtures"],"tags":["configuration","toml","pyproject","project"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}