{
  "id": "python/pip-install-invalid-pyproject-toml",
  "signature": "ERROR: Invalid pyproject.toml config: `project`. configuration error: `project.version` must be a string, was `float`",
  "signature_zh": "错误：pyproject.toml 配置无效：`project`。配置错误：`project.version` 必须是字符串，实际为 `float`。",
  "regex": "ERROR:\\ Invalid\\ pyproject\\.toml\\ config:\\ `project`\\.\\ configuration\\ error:\\ `project\\.version`\\ must\\ be\\ a\\ string,\\ was\\ `float`",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "TOML parses `version = 1.0` as a float, but PEP 621 requires the version field to be a string.",
  "root_cause_type": "generic",
  "root_cause_zh": "TOML 将 `version = 1.0` 解析为浮点数，但 PEP 621 要求 version 字段为字符串。",
  "versions": [
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.13",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The pyproject.toml validation happens before build isolation settings matter.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Newer setuptools enforces the same PEP 621 type rules; the error persists.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.97,
      "how": "Quote the version in pyproject.toml: `version = \"1.0\"` (or use dynamic version via setuptools_scm).",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.94,
      "how": "Validate before building: `python -c \"import tomllib,pathlib; print(tomllib.loads(pathlib.Path('pyproject.toml').read_text())['project']['version'])\"`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}