{"record":{"id":"d330a99994cc9679","repo":"crewAIInc/crewAI","slug":"tool-crewai-definition-must-be-a-non-empty-proje","errorCode":null,"errorMessage":"[tool.crewai] definition must be a non-empty project-local path.","messagePattern":"\\[tool\\.crewai\\] definition must be a non-empty project-local path\\.","errorType":"exception","errorClass":"ProjectDefinitionError","httpStatus":null,"severity":"error","filePath":"lib/crewai-core/src/crewai_core/project.py","lineNumber":91,"sourceCode":"    if pyproject_data is None:\n        pyproject_data = read_toml(root / \"pyproject.toml\")\n\n    crewai_config = get_crewai_project_config(pyproject_data)\n    if crewai_config.get(\"type\") != project_type:\n        return None\n\n    if \"definition\" not in crewai_config:\n        return None\n    raw_definition = crewai_config[\"definition\"]\n    if not isinstance(raw_definition, str):\n        raise ProjectDefinitionError(\n            \"[tool.crewai] definition must be a string project-local path; \"\n            f\"got {raw_definition!r}.\"\n        )\n\n    definition = raw_definition.strip()\n    if not definition:\n        raise ProjectDefinitionError(\n            \"[tool.crewai] definition must be a non-empty project-local path.\"\n        )\n\n    return resolve_project_definition_path(definition=definition, project_root=root)\n\n\ndef resolve_project_definition_path(definition: str, project_root: Path | str) -> Path:\n    \"\"\"Resolve a ``[tool.crewai].definition`` path inside ``project_root``.\"\"\"\n    root_path = Path(project_root)\n    definition_path = Path(definition)\n    windows_definition_path = PureWindowsPath(definition)\n\n    if definition.startswith(\"~\"):\n        raise ProjectDefinitionError(\n            \"[tool.crewai] definition must be a project-local path; \"\n            f\"got {definition!r}.\"\n        )\n","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-core/src/crewai_core/project.py#L73-L109","documentation":"Error \"[tool.crewai] definition must be a non-empty project-local path.\" thrown in crewAIInc/crewAI.","triggerScenarios":"Thrown at lib/crewai-core/src/crewai_core/project.py:91 when the library encounters an invalid state.","commonSituations":"Occurs when [tool.crewai] definition in pyproject.toml is empty or whitespace. Set it to a non-empty project-local path.","solutions":["Provide a non-empty path for [tool.crewai].definition in pyproject.toml.","Point the definition to an existing JSON crew definition file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}