{"record":{"id":"c28f965ede326957","repo":"crewAIInc/crewAI","slug":"project-name-name-would-generate-folder-name-c28f96","errorCode":null,"errorMessage":"Project name '{name}' would generate folder name '{folder_name}' which is a reserved Python keyword","messagePattern":"Project name '(.+?)' would generate folder name '(.+?)' which is a reserved Python keyword","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"lib/cli/src/crewai_cli/create_crew.py","lineNumber":76,"sourceCode":"    folder_name = re.sub(r\"[^a-zA-Z0-9_]\", \"\", folder_name)\n\n    if re.match(r\"^[^a-zA-Z0-9_-]+\", name):\n        raise ValueError(\n            f\"Project name '{name}' contains no valid characters for a Python module name\"\n        )\n\n    if not folder_name:\n        raise ValueError(\n            f\"Project name '{name}' contains no valid characters for a Python module name\"\n        )\n\n    if folder_name[0].isdigit():\n        raise ValueError(\n            f\"Project name '{name}' would generate folder name '{folder_name}' which cannot start with a digit (invalid Python module name)\"\n        )\n\n    if keyword.iskeyword(folder_name):\n        raise ValueError(\n            f\"Project name '{name}' would generate folder name '{folder_name}' which is a reserved Python keyword\"\n        )\n\n    if not folder_name.isidentifier():\n        raise ValueError(\n            f\"Project name '{name}' would generate invalid Python module name '{folder_name}'\"\n        )\n\n    reserved_names = get_reserved_script_names()\n    if folder_name in reserved_names:\n        raise ValueError(\n            f\"Project name '{name}' would generate folder name '{folder_name}' which is reserved. \"\n            f\"Reserved names are: {', '.join(sorted(reserved_names))}. \"\n            \"Please choose a different name.\"\n        )\n\n    class_name = name.replace(\"_\", \" \").replace(\"-\", \" \").title().replace(\" \", \"\")\n","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/cli/src/crewai_cli/create_crew.py#L58-L94","documentation":"Printed by PlusAPIMixin.__init__ in crewai-cli when constructing the Plus API client fails — most commonly because get_auth_token() finds no stored CrewAI+ credentials. The CLI then raises AuthenticationRequiredError (a SystemExit subclass) aborting the command: any Plus/Enterprise CLI command (deploy, etc.) requires prior login.","triggerScenarios":"Running crewai CLI commands that instantiate PlusAPIMixin (e.g. crewai deploy ... or crewai plus ...) before ever running 'crewai login', or after the stored token file was removed/corrupted. The broad `except Exception` also catches a missing/expired token and any PlusAPI construction failure (lib/cli/src/crewai_cli/command.py:38-48).","commonSituations":"Fresh machine or container with no prior login; CI pipeline missing the auth-token provisioning step; token file deleted by a cleanup script or Docker layer; corrupted token JSON.","solutions":["Run 'crewai login' and complete the browser sign-in flow, then retry the command","In CI/automation, provision the token non-interactively the way your CrewAI+ setup documents (exported auth token available to the CLI) before invoking Plus commands","If login was already done, check the token storage location is present and readable for the same user/container that runs the CLI","Catch AuthenticationRequiredError in wrappers/scripts to exit with a clear message instead of a traceback, since it subclasses SystemExit"],"exampleFix":"# before\n$ crewai deploy create ...   # never logged in on this machine\n\n# after\n$ crewai login                # complete sign-in first\n$ crewai deploy create ...","handlingStrategy":"validation","validationCode":"import os\nfrom pathlib import Path\n\ndef plus_cli_ready() -> bool:\n    \"\"\"Cheap preflight: is a crewai auth token present for this user?\"\"\"\n    return bool(os.environ.get(\"CREWAI_API_KEY\")) or Path.home().joinpath(\".crewai\", \"auth_token.json\").exists()","typeGuard":null,"tryCatchPattern":"from crewai_cli.command import AuthenticationRequiredError\n\ntry:\n    run_crew_plus_command()\nexcept AuthenticationRequiredError:\n    # subclasses SystemExit; catch it to convert into a friendly CI failure\n    print('Run \"crewai login\" or provision a token before this job')\n    sys.exit(2)","preventionTips":["Run 'crewai login' once as part of workstation/CI setup before any crewai deploy/plus command","In automation, provision the auth token in the pipeline environment rather than assuming an interactive login","Treat AuthenticationRequiredError (SystemExit subclass) as a setup failure, not a code bug","Re-run login after rotating or revoking CrewAI+ credentials"],"tags":["cli","authentication","crewai-plus","login","setup"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}