GothenburgBitFactory / tasklib

A Python library for interacting with taskwarrior databases.
http://tasklib.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
147 stars 28 forks source link

Example given in README Fails #93

Open venkat1806 opened 3 years ago

venkat1806 commented 3 years ago

The below lines fail with the error

>>> from tasklib import TaskWarrior
>>> tw = TaskWarrior('~/.task')
>>> tasks = tw.tasks.pending()
>>> tasks

Traceback (most recent call last): File "", line 1, in File "/Users/vnkt/anaconda3/lib/python3.7/site-packages/tasklib/task.py", line 464, in repr data = list(self[:REPR_OUTPUT_SIZE + 1]) File "/Users/vnkt/anaconda3/lib/python3.7/site-packages/tasklib/task.py", line 481, in getitem self._result_cache = list(self) File "/Users/vnkt/anaconda3/lib/python3.7/site-packages/tasklib/task.py", line 476, in iter self._result_cache = self._execute() File "/Users/vnkt/anaconda3/lib/python3.7/site-packages/tasklib/task.py", line 508, in _execute return self.backend.filter_tasks(self.filter_obj) File "/Users/vnkt/anaconda3/lib/python3.7/site-packages/tasklib/backends.py", line 334, in filter_tasks for line in self.execute_command(args): File "/Users/vnkt/anaconda3/lib/python3.7/site-packages/tasklib/backends.py", line 297, in execute_command raise TaskWarriorException(error_msg) tasklib.backends.TaskWarriorException: Could not read include file '/usr/local/Cellar/task/2.5.1/share/doc/task/rc/dark-16.theme'. Command used: task rc.confirmation=no rc.dependency.confirmation=no rc.recurrence.confirmation=no rc.json.array=off rc.bulk=0 rc.data.location=/Users/vnkt/.task export status:'pending'

I have upgraded TaskWarrior to 2.5.3 and looks like the lib still searching for a file in 2.5.1

tbabej commented 3 years ago

Hi @venkat1806, this is not related to tasklib, but your taskrc file, which must be attempting to import the theme. The tasklib itself does no handling of the themes itself.