[Bug 1986384] Re: No time zone found with key Asia/Hanoi - pytz 2022.2
Benjamin Drung
1986384 at bugs.launchpad.net
Wed Nov 16 15:45:49 UTC 2022
Thank you for taking the time to report this bug and helping to make
Ubuntu better. Looking at the stack trace, the trace is nearly
completely complaining about files in /usr/local. So this is caused by
locally installed files in the docker image and not the Ubuntu package.
Please report your issue to the provider of this docker image instead. I
am marking this bug as invalid for the python-tz Ubuntu package.
** Changed in: python-tz (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-tz in Ubuntu.
https://bugs.launchpad.net/bugs/1986384
Title:
No time zone found with key Asia/Hanoi - pytz 2022.2
Status in python-tz package in Ubuntu:
Invalid
Bug description:
Hello,
When running the CI/CD pipeline of my Django 3.2 project it broke with
version 2022.2 of pytz and tzdata, using pip.
Dependencies are installed on the docker image python:3.10.
The pipeline runs on GitLab CI
Below is the error stack:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/zoneinfo/_common.py", line 12, in load_tzdata
return importlib.resources.open_binary(package_name, resource_name)
File "/usr/local/lib/python3.10/importlib/resources.py", line 46, in open_binary
return reader.open_resource(resource)
File "/usr/local/lib/python3.10/importlib/abc.py", line 433, in open_resource
return self.files().joinpath(resource).open('rb')
File "/usr/local/lib/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/site-packages/tzdata/zoneinfo/Asia/Hanoi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/builds/cosis/camita/manage.py", line 22, in <module>
main()
File "/builds/cosis/camita/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 395, in execute
django.setup()
File "/usr/local/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.10/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.10/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.10/site-packages/django_celery_beat/models.py", line 8, in <module>
import timezone_field
File "/usr/local/lib/python3.10/site-packages/timezone_field/__init__.py", line 1, in <module>
from timezone_field.fields import TimeZoneField
File "/usr/local/lib/python3.10/site-packages/timezone_field/fields.py", line 11, in <module>
class TimeZoneField(models.Field):
File "/usr/local/lib/python3.10/site-packages/timezone_field/fields.py", line 41, in TimeZoneField
default_zoneinfo_tzs = [ZoneInfo(tz) for tz in pytz.common_timezones]
File "/usr/local/lib/python3.10/site-packages/timezone_field/fields.py", line 41, in <listcomp>
default_zoneinfo_tzs = [ZoneInfo(tz) for tz in pytz.common_timezones]
File "/usr/local/lib/python3.10/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 Asia/Hanoi'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-tz/+bug/1986384/+subscriptions
More information about the foundations-bugs
mailing list