{
  "id": "python/flask-template-syntax-error",
  "signature": "jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got '}'",
  "signature_zh": "Jinja2 模板语法错误：期望语句块结束标记，但得到 '}'",
  "regex": "jinja2\\.exceptions\\.TemplateSyntaxError:\\ expected\\ token\\ 'end\\ of\\ statement\\ block',\\ got\\ '\\}'",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "Flask 模板中的 Jinja2 语法错误，如未闭合的块或错误的标记",
  "root_cause_type": "generic",
  "root_cause_zh": "Flask 模板中的 Jinja2 语法错误，如未闭合的块或错误的标记",
  "versions": [
    {
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "删除整个模板块",
      "why_fails": "功能丢失",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "添加多余的闭合标记",
      "why_fails": "可能导致其他语法错误",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "检查并修复模板语法",
      "success_rate": 0.95,
      "how": "{% if condition %}\n    {{ variable }}\n{% endif %}  # 确保正确闭合",
      "condition": "",
      "sources": []
    },
    {
      "action": "使用模板调试工具",
      "success_rate": 0.9,
      "how": "from jinja2 import Environment\ntemplate = Environment().from_string('{{ invalid')\ntemplate.render()  # 会抛出具体错误",
      "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-10-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}