{
  "id": "python/setuptools-setup-cfg-unknown-key",
  "signature": "error: invalid command class 'foo.bar'  # from [options.entry_points] or unknown setup.cfg key",
  "signature_zh": "错误：无效的命令类 'foo.bar'  # 来自 [options.entry_points] 或未知的 setup.cfg 键",
  "regex": "error:\\ invalid\\ command\\ class\\ 'foo\\.bar'\\ \\ \\#\\ from\\ \\[options\\.entry_points\\]\\ or\\ unknown\\ setup\\.cfg\\ key",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A setup.cfg section or key is misspelled or unsupported by the installed setuptools version (e.g. a key from a newer setuptools used with an older one), so setuptools treats it as an invalid command.",
  "root_cause_type": "generic",
  "root_cause_zh": "setup.cfg 的某个节或键拼写错误，或不被已安装的 setuptools 版本支持（如用旧版 setuptools 使用新版才有的键），因此 setuptools 将其视为无效命令。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disabling isolation doesn't fix an unknown config key; the same invalid command error is raised by the local setuptools.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Removes all metadata and entry points, causing a different failure (missing name/version) instead of fixing the key.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Upgrade setuptools to one that supports the key: python -m pip install --upgrade setuptools  # then rebuild",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.78,
      "how": "Validate the config: python -c \"import configparser; c=configparser.ConfigParser(); c.read('setup.cfg'); print(c.sections())\"  # compare keys against setuptools docs",
      "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.8,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}