Skip to content

[BUG] FileNotFoundError: Notion sync fails with error reading taskrc file. #56

Description

@csgcode

Describe the bug

tw_notion_sync fails with FileNotFoundError, Apparently due to not being able to read the configuration file appropriately.

I installed the application and tried to sync with a page in Notion. The only changes done to .taskrc is I have applied a theme.

To Reproduce

Steps to reproduce the behaviour:

  1. Install and try using tw_notion_sync with a modified .taskrc (I have a theme applied)

Expected Behavior

Sync should work fine.

📸 Screenshots

Logs:

Traceback (most recent call last):
  File "/xxxxxx/code/venvs/task-sync/bin/tw_notion_sync", line 8, in <module>
    sys.exit(main())
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskwarrior_syncall/scripts/tw_notion_sync.py", line 157, in main
    tw_side = TaskWarriorSide(tags=tw_tags, project=tw_project)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskwarrior_syncall/taskwarrior_side.py", line 53, in __init__
    self._tw = TaskWarrior(marshal=True, config_filename=config_file)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskw/warrior.py", line 438, in __init__
    super(TaskWarriorShellout, self).__init__(config_filename)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskw/warrior.py", line 62, in __init__
    self.config = TaskWarriorBase.load_config(config_filename)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskw/warrior.py", line 180, in load_config
    return TaskRc(config_filename, overrides=overrides)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskw/taskrc.py", line 58, in __init__
    config = self._read(self.path)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskw/taskrc.py", line 106, in _read
    TaskRc(right.strip())
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskw/taskrc.py", line 58, in __init__
    config = self._read(self.path)
  File "/xxxxxx/code/venvs/task-sync/lib/python3.9/site-packages/taskw/taskrc.py", line 96, in _read
    with codecs.open(path, 'r', 'utf8') as config_file:
  File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codecs.py", line 905, in open
    file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'dark-yellow-green.theme'

Versions

OS Version (cat /etc/*-release; uname -a)

Darwin MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64

Python version (python --version; python3 --version)

Python 3.9.13

--version of your executable

tw_notion_sync, version 1.2.1

Additional context

Add any other context about the problem here.

Activity

  1. csgcode commented on Sep 17, 2022

    @csgcode
    Author

    Just realized that this might be an issue with taskw. Will update the details.

  2. bergercookie commented on Jan 19, 2023

    @bergercookie
    Owner

    Hi @csgcode , sorry for the late reply.

    Correct, this is an issue with taskw and it's a duplicate of #57. Feel free to open an issue with taskw instead :)

  3. bergercookie commented on Jan 19, 2023

    @bergercookie
    Owner

    Pending PR in taskw that fixes this: ralphbean/taskw#151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions