Closed1

ZoneInfoNotFoundError: 'No time zone found with key Asia/Tokyo'

3w36zj63w36zj6

https://docs.python.org/3/library/zoneinfo.html#data-sources

The zoneinfo module does not directly provide time zone data, and instead pulls time zone information from the system time zone database or the first-party PyPI package tzdata, if available. Some systems, including notably Windows systems, do not have an IANA database available, and so for projects targeting cross-platform compatibility that require time zone data, it is recommended to declare a dependency on tzdata. If neither system data nor tzdata are available, all calls to ZoneInfo will raise ZoneInfoNotFoundError.

Windowsなどでは利用可能なIANAデータベースが存在しないためtzdataが必要。

https://pypi.org/project/tzdata/

このスクラップは2023/11/01にクローズされました