{
  "id": "python/pytest-collection-error-import-error",
  "signature": "ImportError while importing test module: /path/to/test_foo.py\nHint: Make sure your test modules/packages have valid Python names.",
  "signature_zh": "导入测试模块时出错：/path/to/test_foo.py\n提示：确保您的测试模块/包具有有效的 Python 名称。",
  "regex": "ImportError\\ while\\ importing\\ test\\ module:\\ /path/to/test_foo\\.py\\\nHint:\\ Make\\ sure\\ your\\ test\\ modules/packages\\ have\\ valid\\ Python\\ names\\.",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "The test file has a syntax error, imports a missing module, or has a naming conflict.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试文件存在语法错误、导入缺失模块或存在命名冲突。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the issue is a syntax error or missing import, renaming won't help.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This may cause further import issues.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Run python -m py_compile test_foo.py to check syntax.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Rename the file to test_foo.py if it's not already.",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-10-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}