{
  "id": "python/aiohttp-invalid-url",
  "signature": "aiohttp.client_exceptions.InvalidURL: invalid URL http://",
  "signature_zh": "aiohttp客户端异常：无效的 URL http://",
  "regex": "aiohttp\\.client_exceptions\\.InvalidURL:\\ invalid\\ URL\\ http://",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The URL passed to aiohttp request is malformed or empty, such as missing host or scheme.",
  "root_cause_type": "generic",
  "root_cause_zh": "传递给 aiohttp 请求的 URL 格式错误或为空，例如缺少主机或协议。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "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": "Adding extra slashes to the URL",
      "why_fails": "Malformed URLs are not fixed by adding slashes; proper validation is needed.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using a relative URL without base",
      "why_fails": "aiohttp requires absolute URLs; relative paths cause InvalidURL.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Validate and construct URL using yarl.URL",
      "success_rate": 0.95,
      "how": "from yarl import URL; url = URL('http://example.com')",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use urllib.parse to sanitize the URL",
      "success_rate": 0.85,
      "how": "from urllib.parse import urlparse; parsed = urlparse(url); if not parsed.scheme: url = 'http://' + url",
      "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.81,
  "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": []
}