{
  "id": "python/pytest-cache-dir-corruption",
  "signature": "CacheError: Failed to read cache from .pytest_cache/v/cache/nodeids: [Errno 5] Input/output error",
  "signature_zh": "CacheError: 从 .pytest_cache/v/cache/nodeids 读取缓存失败: [Errno 5] 输入/输出错误",
  "regex": "CacheError:\\ Failed\\ to\\ read\\ cache\\ from\\ \\.pytest_cache/v/cache/nodeids:\\ \\[Errno\\ 5\\]\\ Input/output\\ error",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The pytest cache directory is corrupted, often due to a previous test run being interrupted or disk issues.",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest 缓存目录损坏，通常是由于之前的测试运行被中断或磁盘问题。",
  "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": "This clears the cache but does not fix the underlying disk or permission issue that caused corruption.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This is error-prone and may introduce further corruption if the file format is not understood.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Delete the .pytest_cache directory manually: `rm -rf .pytest_cache`",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Run pytest with --cache-clear and ensure proper disk space and permissions.",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-08-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}