GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
739 stars 210 forks source link

bugwarrior-pull fails if colorscheme is enabled in taskrc file #960

Closed vendion closed 1 year ago

vendion commented 1 year ago

Using version 1.8.0 of bugwarrior and taskwarrior 2.6.2, if I enable one of the supplied taskwarrior colorschemes then bugwarrior-pull fails to run.

taskwarrior config:

# Color theme (uncomment one to use)
#include light-16.theme
#include light-256.theme
#include dark-16.theme
include dark-256.theme
#include dark-red-256.theme
#include dark-green-256.theme
#include dark-blue-256.theme
#include dark-violets-256.theme
#include dark-yellow-green.theme
#include dark-gray-256.theme
#include dark-gray-blue-256.theme
#include solarized-dark-256.theme
#include solarized-light-256.theme
#include no-color.theme

Error output

[~]─> bugwarrior-pull
Traceback (most recent call last):
  File "/usr/bin/bugwarrior-pull", line 33, in <module>
    sys.exit(load_entry_point('bugwarrior==1.8.0', 'console_scripts', 'bugwarrior-pull')())
  File "/home/vendion/.local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/vendion/.local/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/vendion/.local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/vendion/.local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/bugwarrior/command.py", line 73, in pull
    synchronize(issue_generator, config, main_section, dry_run)
  File "/usr/lib/python3.10/site-packages/bugwarrior/db.py", line 335, in synchronize
    tw = TaskWarriorShellout(
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 438, in __init__
    super(TaskWarriorShellout, self).__init__(config_filename)
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 62, in __init__
    self.config = TaskWarriorBase.load_config(config_filename)
  File "/usr/lib/python3.10/site-packages/taskw/warrior.py", line 180, in load_config
    return TaskRc(config_filename, overrides=overrides)
  File "/usr/lib/python3.10/site-packages/taskw/taskrc.py", line 58, in __init__
    config = self._read(self.path)
  File "/usr/lib/python3.10/site-packages/taskw/taskrc.py", line 106, in _read
    TaskRc(right.strip())
  File "/usr/lib/python3.10/site-packages/taskw/taskrc.py", line 58, in __init__
    config = self._read(self.path)
  File "/usr/lib/python3.10/site-packages/taskw/taskrc.py", line 96, in _read
    with codecs.open(path, 'r', 'utf8') as config_file:
  File "/usr/lib/python3.10/codecs.py", line 905, in open
    file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'dark-256.theme'
ryneeverett commented 1 year ago

This appears to be duplicate of #871. It's a bug in taskw which is tracked in ralphbean/taskw#150 and fixed in the yet unmerged ralphbean/taskw#151.