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

caldav synchronization error #20

Open
azmeuk opened this issue Sep 25, 2023 · 2 comments
Open

caldav synchronization error #20

azmeuk opened this issue Sep 25, 2023 · 2 comments

Comments

@azmeuk
Copy link

azmeuk commented Sep 25, 2023

I saw on the PR thread that you requested tests on the caldav side.

I get this backtrace when I try to add a caldav backend:

2023-09-25 17:48:24,094 - INFO - backend_caldav:_do_periodic_import:137 - Running periodic import
2023-09-25 17:48:25,621 - INFO - backend_caldav:_do_periodic_import:144 - Fetching todos from 'https://xxxxx.fr/remote.php/dav/calendars/eloi.rivard/gaby-loi/'
Exception in thread Thread-1 (__backend_startup):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/core/datastore.py", line 560, in __backend_startup
    backend.start_get_tasks()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/core/interruptible.py", line 38, in new
    return fn(*args)
           ^^^^^^^^^
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/periodic_import_backend.py", line 79, in start_get_tasks
    self._start_get_tasks()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/periodic_import_backend.py", line 98, in _start_get_tasks
    self.do_periodic_import()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/core/interruptible.py", line 38, in new
    return fn(*args)
           ^^^^^^^^^
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 111, in do_periodic_import
    self._do_periodic_import()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 145, in _do_periodic_import
    self._import_calendar_todos(calendar, start, counts)
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 289, in _import_calendar_todos
    calendar_tasks = dict(self._get_calendar_tasks(calendar))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 345, in _get_calendar_tasks
    for uid in self.datastore.get_all_tasks():
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Datastore' object has no attribute 'get_all_tasks'. Did you mean: 'flush_all_tasks'?
@diegogangl
Copy link
Owner

Thanks, just pushed a fix for that

@azmeuk
Copy link
Author

azmeuk commented Sep 25, 2023

Thanks. Now there is a new one :)

Exception in thread Thread-1 (__backend_startup):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/core/datastore.py", line 560, in __backend_startup
    backend.start_get_tasks()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/core/interruptible.py", line 38, in new
    return fn(*args)
           ^^^^^^^^^
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/periodic_import_backend.py", line 79, in start_get_tasks
    self._start_get_tasks()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/periodic_import_backend.py", line 98, in _start_get_tasks
    self.do_periodic_import()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/core/interruptible.py", line 38, in new
    return fn(*args)
           ^^^^^^^^^
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 111, in do_periodic_import
    self._do_periodic_import()
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 145, in _do_periodic_import
    self._import_calendar_todos(calendar, start, counts)
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 289, in _import_calendar_todos
    calendar_tasks = dict(self._get_calendar_tasks(calendar))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 347, in _get_calendar_tasks
    if CATEGORIES.has_calendar_tag(task, calendar):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eloi/dev/gnome/gtg/.local_build/install/lib/python3.11/site-packages/GTG/backends/backend_caldav.py", line 645, in has_calendar_tag
    return self.get_calendar_tag(calendar) in task.get_tags_name()
                                              ^^^^^^^^^^^^^^^^^^
AttributeError: 'Task' object has no attribute 'get_tags_name'

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