{
  "id": "python/flask-login-user-not-loaded",
  "signature": "AttributeError: 'NoneType' object has no attribute 'is_authenticated'",
  "signature_zh": "属性错误：'NoneType' 对象没有 'is_authenticated' 属性",
  "regex": "AttributeError:\\ 'NoneType'\\ object\\ has\\ no\\ attribute\\ 'is_authenticated'",
  "domain": "python",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "Flask-Login 的 current_user 为 None。",
  "root_cause_type": "generic",
  "root_cause_zh": "Flask-Login 的 current_user 为 None。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "未登录时返回 None。",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "导致程序崩溃。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "if current_user.is_authenticated:\\n    # 处理逻辑\\nelse:\\n    return redirect(url_for('login'))",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "from flask_login import login_required\\n@app.route('/profile')\\n@login_required\\ndef profile():\\n    return 'Profile'",
      "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-09-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}