{
  "id": "python/django-template-filter-error",
  "signature": "django.template.exceptions.TemplateSyntaxError: Could not parse the remainder: '|' from 'my_var|'",
  "signature_zh": "模板语法错误：无法解析 'my_var|' 的剩余部分",
  "regex": "django\\.template\\.exceptions\\.TemplateSyntaxError:\\ Could\\ not\\ parse\\ the\\ remainder:\\ '\\|'\\ from\\ 'my_var\\|'",
  "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.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "添加不存在的过滤器",
      "why_fails": "模板引擎会报错过滤器未定义",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "提供正确的过滤器",
      "success_rate": 1.0,
      "how": "{{ my_var|default:'fallback' }} 或 {{ my_var|upper }}",
      "condition": "",
      "sources": []
    },
    {
      "action": "检查模板语法",
      "success_rate": 0.95,
      "how": "确保管道符后紧跟过滤器名称，没有多余空格",
      "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-06-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}