{
  "id": "python/setuptools-metadata-name-missing",
  "signature": "error in setup.cfg: InvalidConfigError: metadata.name is required",
  "signature_zh": "setup.cfg 错误：InvalidConfigError：metadata.name 为必填项",
  "regex": "error\\ in\\ setup\\.cfg:\\ InvalidConfigError:\\ metadata\\.name\\ is\\ required",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The build configuration (setup.cfg/pyproject.toml) lacks a package name. setuptools cannot produce valid metadata without a name field.",
  "root_cause_type": "generic",
  "root_cause_zh": "构建配置（setup.cfg/pyproject.toml）缺少包名。setuptools 无法在没有 name 字段的情况下生成有效元数据。",
  "versions": [
    {
      "version": "3.8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If pyproject.toml declares build-backend setuptools.build_meta and config files disagree, duplicate/overriding metadata can still error or be ignored.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Empty string is invalid metadata; setuptools raises a different validation error.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.96,
      "how": "# setup.cfg\n[metadata]\nname = mypackage\nversion = 1.0.0\n# or pyproject.toml\n[project]\nname = \"mypackage\"\nversion = \"1.0.0\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "# pyproject.toml\n[project]\nname = \"mypackage\"\ndynamic = [\"version\"]\n# provide version in setup.py: setup(version=compute_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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-16",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}