{
  "id": "python/pip-config-file-parse-error",
  "signature": "ERROR: Invalid config file at /etc/pip.conf: Expected a section header but found 'global'",
  "signature_zh": "错误：/etc/pip.conf 中的配置文件无效：预期节标题但找到 'global'",
  "regex": "ERROR:\\ Invalid\\ config\\ file\\ at\\ /etc/pip\\.conf:\\ Expected\\ a\\ section\\ header\\ but\\ found\\ 'global'",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The pip config file has a malformed INI syntax, often due to missing brackets around section names or stray indentation.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 配置文件存在错误的 INI 语法，通常是因为节名称缺少方括号或存在多余缩进。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Loses intentional settings such as corporate index URLs and trusted hosts.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Ignores all pip configuration, including required mirrors and certs.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Isolated mode ignores user config but still parses the system config file.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Ensure sections look like `[global]` and keys like `index-url = https://pypi.org/simple`; validate with `python -c \"import configparser; c=configparser.ConfigParser(); c.read('/etc/pip.conf')\"`",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pip config list -v",
      "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": "2025-01-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}