Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'zoneinfo' #641

Open
gywndi opened this issue Mar 17, 2024 · 1 comment
Open

No module named 'zoneinfo' #641

gywndi opened this issue Mar 17, 2024 · 1 comment

Comments

@gywndi
Copy link

gywndi commented Mar 17, 2024

Hi

I'm installing webvirtcloud to manage kvm with manual on README.
But I've got in problem relative with "zoneinfo". (My box is running with Ubuntu 20.04.6 LTS)

I changed python3 version from 3.8 to 3.11, but not working.

Traceback (most recent call last):
  File "/srv/webvirtcloud/manage.py", line 21, in <module>
    main()
  File "/srv/webvirtcloud/manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/base.py", line 106, in wrapper
    res = handle_func(*args, **kwargs)
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 100, in handle
    self.check(databases=[database])
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/management/base.py", line 485, in check
    all_issues = checks.run_checks(
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/checks/registry.py", line 88, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/core/checks/templates.py", line 60, in check_for_template_tags_with_the_same_name
    for module_name, module_path in get_template_tag_modules():
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/template/backends/django.py", line 105, in get_template_tag_modules
    for name in get_package_libraries(pkg):
  File "/srv/webvirtcloud/venv/lib/python3.8/site-packages/django/template/backends/django.py", line 130, in get_package_libraries
    raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'qr_code.templatetags.qr_code': No module named 'zoneinfo'
@jbguo424
Copy link

jbguo424 commented May 7, 2024

vi /srv/webvirtcloud/venv/lib/python3.8/site-packages/qr_code/qrcode/utils.py
"""Utility classes and functions for configuring and setting up the content and the look of a QR code."""
import datetime
import decimal
from collections import namedtuple
from dataclasses import asdict
from datetime import date
from decimal import Decimal
from enum import Enum
from typing import Optional, Any, Union, Sequence, List, Tuple

#import zoneinfo
from backports.zoneinfo import ZoneInfo as zoneinfo

I fixed it using this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants