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

Fresh "From Source" install. No module named 'zoneinfo' #28

Open
Kuzma30 opened this issue Dec 8, 2022 · 2 comments
Open

Fresh "From Source" install. No module named 'zoneinfo' #28

Kuzma30 opened this issue Dec 8, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@Kuzma30
Copy link

Kuzma30 commented Dec 8, 2022

I just try to compile mimic3 from source on Rpi4 (OS -Yocto B2Qt image v 4.1.1). It compile fine. But when I try run ./mimic3-server in .venv/bin I get

./mimic3-server   
Traceback (most recent call last):
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/pytz_deprecation_shim/_compat_py3.py", line 5, in <module>
    import zoneinfo
ModuleNotFoundError: No module named 'zoneinfo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/root/mimic3/.venv/bin/./mimic3-server", line 33, in <module>
    sys.exit(load_entry_point('mycroft-mimic3-tts', 'console_scripts', 'mimic3-server')())
  File "/home/root/mimic3/.venv/bin/./mimic3-server", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/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 "/home/root/mimic3/mimic3_http/__main__.py", line 25, in <module>
    from .app import get_app
  File "/home/root/mimic3/mimic3_http/app.py", line 41, in <module>
    from mimic3_tts import DEFAULT_VOICE, Mimic3Settings, Mimic3TextToSpeechSystem
  File "/home/root/mimic3/mimic3_tts/__init__.py", line 17, in <module>
    from .tts import Mimic3Settings, Mimic3TextToSpeechSystem
  File "/home/root/mimic3/mimic3_tts/tts.py", line 53, in <module>
    from .voice import SPEAKER_TYPE, BreakType, Mimic3Voice
  File "/home/root/mimic3/mimic3_tts/voice.py", line 29, in <module>
    import gruut
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/gruut/__init__.py", line 13, in <module>
    from gruut.text_processor import Sentence, TextProcessor
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/gruut/text_processor.py", line 13, in <module>
    import dateparser
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/dateparser/__init__.py", line 3, in <module>
    from .date import DateDataParser
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/dateparser/date.py", line 7, in <module>
    from tzlocal import get_localzone
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/tzlocal/__init__.py", line 10, in <module>
    from tzlocal.unix import get_localzone, get_localzone_name, reload_localzone
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/tzlocal/unix.py", line 6, in <module>
    import pytz_deprecation_shim as pds
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/pytz_deprecation_shim/__init__.py", line 16, in <module>
    from . import helpers
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/pytz_deprecation_shim/helpers.py", line 5, in <module>
    from . import _common, _compat
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/pytz_deprecation_shim/_compat.py", line 6, in <module>
    from . import _compat_py3 as _compat_impl
  File "/home/root/mimic3/.venv/lib/python3.10/site-packages/pytz_deprecation_shim/_compat_py3.py", line 7, in <module>
    from backports import zoneinfo
ModuleNotFoundError: No module named 'backports'

@Kuzma30 Kuzma30 added the bug Something isn't working label Dec 8, 2022
@septatrix
Copy link

zoneinfo is part of Python starting with Python 3.9, before that you would have to install backports.zoneinfo.

You could confirm if that fixes the issue but in general that would probably need to be added in the setup.py file:

extras_require={':python_version<"3.9"': ["importlib_resources"], **extras_require},

@synesthesiam
Copy link
Collaborator

I see things like this sometimes if you haven't upgraded pip inside your virtual environment. After doing that, you may have to also upgrade dateparser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants