{
  "id": "python/pip-egg-info-metadata-generation-failed",
  "signature": "error: error in 'egg_info' command: 'NoneType' object has no attribute 'get'",
  "signature_zh": "错误：'egg_info' 命令出错：'NoneType' 对象没有属性 'get'",
  "regex": "error:\\ error\\ in\\ 'egg_info'\\ command:\\ 'NoneType'\\ object\\ has\\ no\\ attribute\\ 'get'",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A malformed or partially missing setup.cfg/pyproject.toml section causes setuptools' metadata reader to receive None where a dict is expected during egg_info generation.",
  "root_cause_type": "generic",
  "root_cause_zh": "setup.cfg/pyproject.toml 段落格式错误或缺失，导致 setuptools 的元数据读取器在 egg_info 生成过程中收到 None 而非 dict。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Isolation is not the cause; the malformed metadata file still breaks egg_info.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The stale directory is regenerated from the same malformed config, reproducing the error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "A newer setuptools may produce a clearer error but still cannot parse an invalid config.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Validate config: python -c \"import configparser,sys; c=configparser.ConfigParser(); c.read('setup.cfg'); print(dict(c['metadata']))\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Move metadata into pyproject.toml's [project] table and remove the conflicting setup.cfg section",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "Run python setup.py egg_info -v to see the full traceback and locate the offending key",
      "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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}