anufrievroman / calcure

Modern TUI calendar and task manager with minimal and customizable UI.
https://anufrievroman.gitbook.io/calcure
MIT License
1.48k stars 42 forks source link

Color theme of taskwarrior throws error #99

Open AnirudhG07 opened 3 months ago

AnirudhG07 commented 3 months ago

Hi, I am running taskwarrior and calcure on MacOS M1 apple-silicon.

Taskwarrior version - 3.0.2 Calcure version - 3.0.1 Terminal - iTerm, shell - zsh.

Issue

I have various color themes set for taskwarrior present in ~/.taskrc file.

When i import taskwarrior data into Journal by pressing W. The below error shows up.

Traceback (most recent call last):
  File "/opt/anaconda3/bin/calcure", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/calcure/__main__.py", line 1090, in cli
    curses.wrapper(main)
  File "/opt/anaconda3/lib/python3.11/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/calcure/__main__.py", line 1058, in main
    control_journal_screen(stdscr, screen, user_tasks, importer)
  File "/opt/anaconda3/lib/python3.11/site-packages/calcure/controls.py", line 35, in inner
    func(stdscr, screen, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.11/site-packages/calcure/controls.py", line 517, in control_journal_screen
    importer.import_tasks_from_taskwarrior()
  File "/opt/anaconda3/lib/python3.11/site-packages/calcure/importers.py", line 52, in import_tasks_from_taskwarrior
    tasks = TaskWarrior().load_tasks()
            ^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/taskw/warrior.py", line 430, in __init__
    super(TaskWarriorShellout, self).__init__(config_filename)
  File "/opt/anaconda3/lib/python3.11/site-packages/taskw/warrior.py", line 54, in __init__
    self.config = TaskWarriorBase.load_config(config_filename)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/taskw/warrior.py", line 172, in load_config
    return TaskRc(config_filename, overrides=overrides)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/taskw/taskrc.py", line 57, in __init__
    config = self._read(self.path)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/taskw/taskrc.py", line 105, in _read
    TaskRc(right.strip())
  File "/opt/anaconda3/lib/python3.11/site-packages/taskw/taskrc.py", line 57, in __init__
    config = self._read(self.path)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/lib/python3.11/site-packages/taskw/taskrc.py", line 95, in _read
    with open(path, 'r') as config_file:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'dark-yellow-green.theme'

Main issue is that it is throwing an error for dark-yellow-theme. I dont want any themes to be added in calcure, the color suits my taste. Pls share how i can maintain the task warrior theme i have set without having this error.

Also does calcure also marks the due, until dates, etc. on the calendar from taskwarrior? As far as i have seen, it doesn't. It would be great if it can be enabled.

anufrievroman commented 3 months ago

I think it might be related to their recent migration to a different database, no? It's discussed here #98

anufrievroman commented 3 months ago

Basically, it seems like this is some issue of the taskw library. I mentioned it there, hopefully they can fix it, otherwise, we might need to go back to our own parcer.