Upgrade from v3.2.3 to 3.2.8 failed with No time zone found with key Europe/Kyiv #6810

Closed
opened 2025-12-29 19:45:41 +01:00 by adam · 2 comments
Owner

Originally created by @oit-operations on GitHub (Aug 15, 2022).

NetBox version

v3.2.3

Python version

3.9

Steps to Reproduce

This occurred on RHEL 8.6 with python 3.9. Went to upgrade from the git repo using the upgrade.sh script.
git pull origin master
./upgrade.sh

Expected Behavior

Upgrade to 3.2.8 successful

Observed Behavior

Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
File "/usr/lib64/python3.9/zoneinfo/_common.py", line 12, in load_tzdata
return importlib.resources.open_binary(package_name, resource_name)
File "/usr/lib64/python3.9/importlib/resources.py", line 91, in open_binary
return reader.open_resource(resource)
File "", line 1055, in open_resource
FileNotFoundError: [Errno 2] No such file or directory: '/opt/netbox/venv/lib64/python3.9/site-packages/tzdata/zoneinfo/Europe/Kyiv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/init.py", line 420, in execute
django.setup()
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/apps/config.py", line 228, in create
import_module(entry)
File "/usr/lib64/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/init.py", line 1, in
from timezone_field.fields import TimeZoneField
File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/fields.py", line 11, in
class TimeZoneField(models.Field):
File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/fields.py", line 41, in TimeZoneField
default_zoneinfo_tzs = [ZoneInfo(tz) for tz in pytz.common_timezones]
File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/fields.py", line 41, in
default_zoneinfo_tzs = [ZoneInfo(tz) for tz in pytz.common_timezones]
File "/usr/lib64/python3.9/zoneinfo/_common.py", line 24, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Europe/Kyiv'

Originally created by @oit-operations on GitHub (Aug 15, 2022). ### NetBox version v3.2.3 ### Python version 3.9 ### Steps to Reproduce This occurred on RHEL 8.6 with python 3.9. Went to upgrade from the git repo using the upgrade.sh script. git pull origin master ./upgrade.sh ### Expected Behavior Upgrade to 3.2.8 successful ### Observed Behavior Applying database migrations (python3 netbox/manage.py migrate)... Traceback (most recent call last): File "/usr/lib64/python3.9/zoneinfo/_common.py", line 12, in load_tzdata return importlib.resources.open_binary(package_name, resource_name) File "/usr/lib64/python3.9/importlib/resources.py", line 91, in open_binary return reader.open_resource(resource) File "<frozen importlib._bootstrap_external>", line 1055, in open_resource FileNotFoundError: [Errno 2] No such file or directory: '/opt/netbox/venv/lib64/python3.9/site-packages/tzdata/zoneinfo/Europe/Kyiv' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/netbox/netbox/manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 420, in execute django.setup() File "/opt/netbox/venv/lib64/python3.9/site-packages/django/__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/opt/netbox/venv/lib64/python3.9/site-packages/django/apps/registry.py", line 91, in populate app_config = AppConfig.create(entry) File "/opt/netbox/venv/lib64/python3.9/site-packages/django/apps/config.py", line 228, in create import_module(entry) File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/__init__.py", line 1, in <module> from timezone_field.fields import TimeZoneField File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/fields.py", line 11, in <module> class TimeZoneField(models.Field): File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/fields.py", line 41, in TimeZoneField default_zoneinfo_tzs = [ZoneInfo(tz) for tz in pytz.common_timezones] File "/opt/netbox/venv/lib64/python3.9/site-packages/timezone_field/fields.py", line 41, in <listcomp> default_zoneinfo_tzs = [ZoneInfo(tz) for tz in pytz.common_timezones] File "/usr/lib64/python3.9/zoneinfo/_common.py", line 24, in load_tzdata raise ZoneInfoNotFoundError(f"No time zone found with key {key}") zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Europe/Kyiv'
adam added the type: bugstatus: duplicate labels 2025-12-29 19:45:41 +01:00
adam closed this issue 2025-12-29 19:45:41 +01:00
Author
Owner

@oit-operations commented on GitHub (Aug 15, 2022):

Based on this post: https://stackoverflow.com/questions/73332533/django-4-error-no-time-zone-found-with-key

I added this to requirements and it netbox appears to have upgraded successfully: pytz==2022.1

@oit-operations commented on GitHub (Aug 15, 2022): Based on this post: https://stackoverflow.com/questions/73332533/django-4-error-no-time-zone-found-with-key I added this to requirements and it netbox appears to have upgraded successfully: pytz==2022.1
Author
Owner

@jeremystretch commented on GitHub (Aug 15, 2022):

This is a duplicate of #9986, which is currently pinned to the top of the issues list.

@jeremystretch commented on GitHub (Aug 15, 2022): This is a duplicate of #9986, which is currently pinned to the top of the issues list.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6810