{
  "id": "python/pytest-cache-error",
  "signature": "ValueError: cache directory is not writable: /path/to/.pytest_cache",
  "signature_zh": "值错误：缓存目录不可写：/path/to/.pytest_cache",
  "regex": "ValueError:\\ cache\\ directory\\ is\\ not\\ writable:\\ /path/to/\\.pytest_cache",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "pytest的缓存目录权限不足或路径不存在，导致无法写入缓存。",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest的缓存目录权限不足或路径不存在，导致无法写入缓存。",
  "versions": [
    {
      "version": "7.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "8.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "删除后pytest会尝试重新创建，但权限问题依然存在",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "sudo可能改变权限，但不推荐，且可能引发其他问题",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "chmod -R u+w .pytest_cache",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pytest --cache-clear",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-12-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}