{
  "id": "python/django-template-variable-not-defined",
  "signature": "django.template.exceptions.TemplateSyntaxError: Invalid block tag: 'endblock', expected 'endblock' or 'endblock %}'",
  "signature_zh": "模板语法错误：无效的块标签 'endblock'",
  "regex": "django\\.template\\.exceptions\\.TemplateSyntaxError:\\ Invalid\\ block\\ tag:\\ 'endblock',\\ expected\\ 'endblock'\\ or\\ 'endblock\\ %\\}'",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "模板中块标签未正确闭合，或使用了错误的标签名称",
  "root_cause_type": "generic",
  "root_cause_zh": "Django 模板引擎解析时发现块标签不匹配或拼写错误",
  "versions": [
    {
      "version": "3.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "删除块标签",
      "why_fails": "模板结构被破坏，可能导致内容缺失",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "添加额外的 endblock",
      "why_fails": "导致模板嵌套混乱，可能产生更多错误",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "检查并修正块标签",
      "success_rate": 0.95,
      "how": "{% block content %}...{% endblock %} 确保标签匹配",
      "condition": "",
      "sources": []
    },
    {
      "action": "使用模板调试工具",
      "success_rate": 0.9,
      "how": "检查模板缩进和标签闭合，确保每个 block 都有对应的 endblock",
      "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-09-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}