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

Fix ical import allowing caldav==1.4.0 #361

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Conversation

Oshgnacknak
Copy link
Contributor

@Oshgnacknak Oshgnacknak commented Dec 1, 2024

Arch Linux bumped the python-caldav package to version 1.4.0. This change broke errands on this distribution. Instead of a normal caldav sync taking place, the following error message was displayed:

Exception in thread Thread-1 (sync):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/errands/errands/lib/sync/sync.py", line 53, in sync
    self.provider.sync()
  File "/usr/share/errands/errands/lib/sync/providers/caldav.py", line 215, in sync
    self.__sync_lists()
  File "/usr/share/errands/errands/lib/sync/providers/caldav.py", line 235, in __sync_lists
    self.__update_local_list(cal, list)
  File "/usr/share/errands/errands/lib/sync/providers/caldav.py", line 298, in __update_local_list
    color = cal.get_property(caldav.elements.ical.CalendarColor())
                             ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'caldav.elements' has no attribute 'ical'

A simple import fix seems to do the trick. I have not tested if this fix also supports caldav==1.3.9, but I can imagine that it does.

Off Topic: I use Errands daily because it seems to be the only caldav client supported on Linux that allows nested todos to be synchronized via caldav. I would like to thank the developers for their time. My live unironically depends on errands to some decree.

  • Osh

@mrvladus mrvladus merged commit 7147f23 into mrvladus:main Dec 2, 2024
1 check passed
@mrvladus
Copy link
Owner

mrvladus commented Dec 2, 2024

Thank you! I'm currently rewriting whole app in C, and I want to improve syncing as much as possible.

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

Successfully merging this pull request may close these issues.

2 participants