[Solved] Django 4 Error: 'No time zone found with key'
Python
Mohit Mozumder
Problem:
When i am trying to rebuild my Django 4 Docker container the web service suddenly stopped working and show this error error:
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Asia/Hanoi'
Upgrade pytz and tzdata to the latest version by those command-
pip install pytz --upgrade
pip install tzdata --upgrade
If its not working, first uninstall pytz & tzdata by those commandpip uninstall pytz
pip uninstall tzdata
Then install the latest version again-
pip install pytz==2022.2.1
pip install tzdata==2022.2
Thank you for reading the article. If your problem is not solved yet feel free to contact with us.