You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to setup CalDAV sync, and I got the following issue:
2024-03-07 07:55:30,052 - INFO - backend_caldav:_do_periodic_import:137 - Running periodic import
2024-03-07 07:55:30,237 - INFO - backend_caldav:_do_periodic_import:144 - Fetching todos from '<redacted-1>'
2024-03-07 07:55:30,714 - INFO - backend_caldav:_do_periodic_import:144 - Fetching todos from '<redacted-2>'
Exception in thread Thread-3 (_internal_flush_all_tasks):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_innerself.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
2024-03-07 07:55:31,120 - INFO - backend_caldav:_do_periodic_import:137 - Running periodic import
self._target(*self._args, **self._kwargs)
File "GTG/core/datastore.py", line 664, in _internal_flush_all_tasks
backend.queue_set_task(task.id)
File "GTG/backends/generic_backend.py", line 680, in queue_set_task
tid = task.get_id()
AttributeError: 'str' object has no attribute 'get_id'
I added a print(task) right before the faulty line, and I got:
33d9760d-2e07-4ae4-9c02-1fcdaeb46325
This is the faulty function:
defqueue_set_task(self, task):
""" Save the task in the backend. In particular, it just enqueues the task in the self.to_set queue. A thread will shortly run to apply the requested changes. @param task: the task that should be saved """tid=task.get_id()
iftasknotinself.to_setandtidnotinself.to_remove:
self.to_set.appendleft(task)
self.__try_launch_setting_thread()
Looks like a simple mistake in the caller?
def_internal_flush_all_tasks():
backend=self.backends[backend_id]
fortaskinself.tasks.data:
ifself.please_quit:
breakbackend.queue_set_task(task.id) # ← Should be `task`?
Except that Task objects don't have a get_id, they have .id. After fixing that too I get a bit further in the import before getting to another crash, though in the DAV client this time.
Exception in thread Thread-1 (__backend_startup):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_innerself.run()
File "/usr/lib/python3.10/threading.py", line 953, in runself._target(*self._args, **self._kwargs)
File "GTG/core/datastore.py", line 579, in __backend_startup
backend.start_get_tasks()
File "GTG/core/interruptible.py", line 38, in newreturn fn(*args)
File "GTG/backends/periodic_import_backend.py", line 79, in start_get_tasksself._start_get_tasks()
File "GTG/backends/periodic_import_backend.py", line 98, in _start_get_tasksself.do_periodic_import()
File "GTG/core/interruptible.py", line 38, in newreturn fn(*args)
File "GTG/backends/backend_caldav.py", line 111, in do_periodic_importself._do_periodic_import()
File "GTG/backends/backend_caldav.py", line 139, in _do_periodic_importself._refresh_calendar_list()
File "GTG/backends/backend_caldav.py", line 217, in _refresh_calendar_list
principal =self._dav_client.principal()
File "caldav/davclient.py", line 425, in principalself._principal = Principal(client=self, *largs, **kwargs)
File "caldav/objects.py", line 506, in __init__
cup =self.get_property(dav.CurrentUserPrincipal())
File "caldav/objects.py", line 224, in get_property
foo =self.get_properties([prop], **passthrough)
File "caldav/objects.py", line 256, in get_properties
properties = response.expand_simple_props(props)
File "caldav/davclient.py", line 298, in expand_simple_propsself.find_objects_and_props()
File "caldav/davclient.py", line 221, in find_objects_and_props
responses =self._strip_to_multistatus()
File "caldav/davclient.py", line 157, in _strip_to_multistatusif tree.tag =="xml"and tree[0].tag == dav.MultiStatus.tag:
AttributeError: 'NoneType' object has no attribute 'tag'
The text was updated successfully, but these errors were encountered:
I'm trying to setup CalDAV sync, and I got the following issue:
I added a
print(task)
right before the faulty line, and I got:This is the faulty function:
Looks like a simple mistake in the caller?
Except that
Task
objects don't have aget_id
, they have.id
. After fixing that too I get a bit further in the import before getting to another crash, though in the DAV client this time.The text was updated successfully, but these errors were encountered: