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

Some problem with 'localtime' #33

Closed
diego-rapoport opened this issue Oct 1, 2022 · 2 comments
Closed

Some problem with 'localtime' #33

diego-rapoport opened this issue Oct 1, 2022 · 2 comments

Comments

@diego-rapoport
Copy link

So I tried to run trellowarrior and it get's me this error:

Traceback (most recent call last):
  File "/usr/lib/python3.10/zoneinfo/_common.py", line 12, in load_tzdata
    return importlib.resources.open_binary(package_name, resource_name)
  File "/usr/lib/python3.10/importlib/resources.py", line 46, in open_binary
    return reader.open_resource(resource)
  File "/usr/lib/python3.10/importlib/abc.py", line 433, in open_resource
    return self.files().joinpath(resource).open('rb')
  File "/usr/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: '/home/dinhego/.local/lib/python3.10/site-packages/tzdata/zoneinfo/localtime'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sbin/trellowarrior", line 33, in <module>
    sys.exit(load_entry_point('trellowarrior==1.3.2', 'console_scripts', 'trellowarrior')())
  File "/sbin/trellowarrior", 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 "/usr/lib/python3.10/site-packages/trellowarrior/main.py", line 13, in <module>
    from trellowarrior.commands.sync import sync
  File "/usr/lib/python3.10/site-packages/trellowarrior/commands/sync.py", line 9, in <module>
    from trellowarrior.clients.trellowarrior import TrelloWarriorClient
  File "/usr/lib/python3.10/site-packages/trellowarrior/clients/trellowarrior.py", line 9, in <module>
    from trellowarrior.clients.taskwarrior import TaskwarriorClient
  File "/usr/lib/python3.10/site-packages/trellowarrior/clients/taskwarrior.py", line 10, in <module>
    from tasklib.backends import TaskWarrior as Client
  File "/usr/lib/python3.10/site-packages/tasklib/__init__.py", line 1, in <module>
    from .backends import TaskWarrior
  File "/usr/lib/python3.10/site-packages/tasklib/backends.py", line 11, in <module>
    from .task import Task, TaskQuerySet, ReadOnlyDictView
  File "/usr/lib/python3.10/site-packages/tasklib/task.py", line 10, in <module>
    from .serializing import SerializingObject, local_zone
  File "/usr/lib/python3.10/site-packages/tasklib/serializing.py", line 13, in <module>
    local_zone = ZoneInfo('localtime')
  File "/usr/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 localtime'

tzdata is installed, apparently, when I run pip list

@ogarcia
Copy link
Owner

ogarcia commented Oct 1, 2022

It looks like you have a problem in your Python package installation. Try creating a new virtualenv and perform the installation from scratch as indicated in the readme:

python3 -m venv trw
. trw/bin/activate
python3 -m pip install trellowarrior

The first python3 -m venv trw command will create a twr directory where it will host both the virtualenv and the trellowarrior command. For example if you run this command in your home you would have a /home/dinhego/trw directory, so remember do . /home/dinhego/trw/bin/activate every time you open your console to run trellowarrior.

@diego-rapoport
Copy link
Author

Thanks! It worked that way. Wish I could debug it to understand why it didn't work with my globals but using this way is fine to me.

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