{"record":{"id":"a0602b9ad832e027","repo":"langchain-ai/langgraph","slug":"cannot-determine-timezone-name-from-tz-r-use-a","errorCode":null,"errorMessage":"Cannot determine timezone name from {tz!r}. Use a zoneinfo.ZoneInfo instance or pass a string like 'America/New_York'.","messagePattern":"Cannot determine timezone name from (.+?)\\. Use a zoneinfo\\.ZoneInfo instance or pass a string like 'America/New_York'\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/sdk-py/langgraph_sdk/_shared/utilities.py","lineNumber":154,"sourceCode":"    Accepts:\n        - A string (returned as-is, assumed to be an IANA timezone name)\n        - A ``datetime.tzinfo`` instance (e.g. ``zoneinfo.ZoneInfo(\"America/New_York\")``,\n          ``datetime.timezone.utc``). The ``key`` attribute is used if available,\n          otherwise ``tzname(None)`` is used.\n        - ``None`` (returned as ``None``)\n    \"\"\"\n    if tz is None or isinstance(tz, str):\n        return tz\n    if isinstance(tz, tzinfo):\n        # ZoneInfo objects have a .key attribute with the IANA name\n        key = getattr(tz, \"key\", None)\n        if isinstance(key, str):\n            return key\n        # Fall back to tzname for fixed-offset timezones like datetime.timezone.utc\n        name = tz.tzname(None)\n        if name is not None:\n            return name\n        raise ValueError(\n            f\"Cannot determine timezone name from {tz!r}. \"\n            \"Use a zoneinfo.ZoneInfo instance or pass a string like 'America/New_York'.\"\n        )\n    raise TypeError(\n        f\"Expected str, datetime.tzinfo, or None for timezone, got {type(tz).__name__}\"\n    )\n\n\ndef _default_port(scheme: str) -> int:\n    return 443 if scheme == \"https\" else 80\n\n\ndef _validate_reconnect_location(base_url: httpx.URL, location: str) -> str:\n    \"\"\"Validate that a reconnect Location URL is same-origin as the base URL.\n\n    Raises ValueError if the Location header points to a different origin\n    (scheme + host + port), which would leak credentials to an external server.\n    \"\"\"","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/sdk-py/langgraph_sdk/_shared/utilities.py#L136-L172","documentation":"Error \"Cannot determine timezone name from {tz!r}. Use a zoneinfo.ZoneInfo instance or pass a string like 'America/New_York'.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/sdk-py/langgraph_sdk/_shared/utilities.py:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}