{"record":{"id":"13a4bc3292f3b88d","repo":"crewAIInc/crewAI","slug":"project-name-name-would-generate-folder-name","errorCode":null,"errorMessage":"Project name '{name}' would generate folder name '{folder_name}' which cannot start with a digit (invalid Python module name)","messagePattern":"Project name '(.+?)' would generate folder name '(.+?)' which cannot start with a digit \\(invalid Python module name\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"lib/cli/src/crewai_cli/create_crew.py","lineNumber":71,"sourceCode":"\n    if not name.strip():\n        raise ValueError(\"Project name cannot be empty or contain only whitespace\")\n\n    folder_name = name.replace(\" \", \"_\").replace(\"-\", \"_\").lower()\n    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))}. \"","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/cli/src/crewai_cli/create_crew.py#L53-L89","documentation":"Raised by validate_auth_against_agent_card (A2AClientHTTPError 401) as the fall-through when the card's first security requirement references a scheme the validator cannot map: the scheme_name is missing from security_schemes, or its type/scheme value is unrecognized by _SCHEME_AUTH_MAPPING and _HTTP_SCHEME_MAPPING. The validator cannot prove the provided auth satisfies the requirement, so it refuses.","triggerScenarios":"AgentCard declares a scheme type the client library version does not know (e.g. a newer spec scheme like OpenIdConnect variants or a custom HTTP scheme value like scheme='digest'), or security[0] references a scheme name that has no entry in security_schemes so the loop completes without returning (utils.py:171-191).","commonSituations":"Version skew: remote agent built with a newer CrewAI/a2a-sdk exposing scheme types the client cannot map; hand-crafted AgentCard with inconsistent security vs security_schemes keys; typo in the scheme key inside the first security requirement.","solutions":["Check that every key in agent_card.security[0] exists in agent_card.security_schemes — fix the card if a name is misspelled","Upgrade the client's crewai package to a version whose _SCHEME_AUTH_MAPPING/_HTTP_SCHEME_MAPPING cover the declared scheme type","If the card offers multiple security options, pass an auth matching one of the mappable schemes so the validator returns early","For custom scheme types, adjust the serving agent's AgentCard to use a standard scheme (apiKey, http/bearer, http/basic, oauth2) the client understands"],"exampleFix":"# before (card inconsistency)\nsecurity=[{'auth_key': {}}],  # 'auth_key' not present in security_schemes\n\n# after\nsecurity=[{'apiKey': {}}],\nsecurity_schemes={'apiKey': APIKeySecurityScheme(name='apiKey', location=APIKeyLocation.header, header_name='X-API-Key')}","handlingStrategy":"validation","validationCode":"def card_is_validatable(card) -> bool:\n    \"\"\"Every scheme named by security[0] must exist in security_schemes.\"\"\"\n    if not card.security or not card.security_schemes:\n        return True\n    named = card.security[0] if card.security else {}\n    return all(name in card.security_schemes for name in named)","typeGuard":null,"tryCatchPattern":"from crewai.a2a.auth.errors import A2AClientHTTPError\nfrom crewai.a2a.auth.utils import validate_auth_against_agent_card\n\ntry:\n    validate_auth_against_agent_card(card, auth)\nexcept A2AClientHTTPError as e:\n    if e.code == 401 and \"Could not validate\" in str(e):\n        # unmapped/unknown scheme: upgrade client or pin the agent to a standard scheme\n        raise UnsupportedCardScheme(str(e)) from e\n    raise","preventionTips":["Pin client and server to compatible crewai versions so scheme-type mappings stay in sync","When hand-authoring AgentCards, add a test asserting every key in security[0] exists in security_schemes","Stick to standard scheme types (apiKey, http/bearer, http/basic, oauth2) the client maps","On 'Could not validate', check for a client upgrade before debugging your own auth object"],"tags":["a2a","authentication","agent-card","version-skew","http-401"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}