-
Notifications
You must be signed in to change notification settings - Fork 502
Open
Labels
hook:emailrelated to email (smtp) hook submaintainer: @nwithan8related to email (smtp) hook submaintainer: @nwithan8need:support-by-sub-maintainer
Description
I spotted that when I have email hook enabled and I'm creating all day event (event with start and end as date without start/end time) I end up with duplicated event once I sync them with DAVx5 from my Android phone.
There I'm attaching log presenting the issue.
[radicale] 2026-03-22T17:30:32.935852275Z [2026-03-22 17:30:32 +0000] [7/Thread-20 (process_request_thread)] [DEBUG] Received notification_item: {'type': 'upsert', 'point': 'tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38', '_content_legacy': 'BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:DAVx5/4.5.9-ose ical4j/3.2.19\r\nBEGIN:VEVENT\r\nUID:07dc5278-9463-43de-99a8-ac2c885210df\r\nDTSTART;VALUE=DATE:20260324\r\nDTEND;VALUE=DATE:20260325\r\nDTSTAMP:20260322T173030Z\r\nSTATUS:CONFIRMED\r\nSUMMARY:All day from phone\r\nBEGIN:VALARM\r\nACTION:DISPLAY\r\nDESCRIPTION:All day from phone\r\nTRIGGER:-PT10M\r\nEND:VALARM\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n', 'uid': None, 'new_content': 'BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:DAVx5/4.5.9-ose ical4j/3.2.19\r\nBEGIN:VEVENT\r\nUID:07dc5278-9463-43de-99a8-ac2c885210df\r\nDTSTART;VALUE=DATE:20260324\r\nDTEND;VALUE=DATE:20260325\r\nDTSTAMP:20260322T173030Z\r\nSTATUS:CONFIRMED\r\nSUMMARY:All day from phone\r\nBEGIN:VALARM\r\nACTION:DISPLAY\r\nDESCRIPTION:All day from phone\r\nTRIGGER:-PT10M\r\nEND:VALARM\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n', 'old_content': None}
[radicale] 2026-03-22T17:30:32.942623571Z [2026-03-22 17:30:32 +0000] [7/Thread-20 (process_request_thread)] [ERROR] An exception occurred during PUT request on '/radicale/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38/07dc5278-9463-43de-99a8-ac2c885210df.ics': 'datetime.date' object has no attribute 'tzinfo'
[radicale] 2026-03-22T17:30:32.942663897Z Traceback (most recent call last):
[radicale] 2026-03-22T17:30:32.942672993Z File "/venv/lib/python3.12/site-packages/radicale/app/__init__.py", line 214, in __call__
[radicale] 2026-03-22T17:30:32.942681578Z status_text, headers, answers = self._handle_request(environ)
[radicale] 2026-03-22T17:30:32.942690567Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[radicale] 2026-03-22T17:30:32.942698963Z File "/venv/lib/python3.12/site-packages/radicale/app/__init__.py", line 537, in _handle_request
[radicale] 2026-03-22T17:30:32.942707481Z status, headers, answer, xml_request = function(
[radicale] 2026-03-22T17:30:32.942715599Z ^^^^^^^^^
[radicale] 2026-03-22T17:30:32.942723956Z File "/venv/lib/python3.12/site-packages/radicale/app/put.py", line 347, in do_PUT
[radicale] 2026-03-22T17:30:32.942732445Z self._hook.notify(hook_notification_item)
[radicale] 2026-03-22T17:30:32.942740775Z File "/venv/lib/python3.12/site-packages/radicale/hook/email/__init__.py", line 940, in notify
[radicale] 2026-03-22T17:30:32.942767980Z self._process_event_and_notify(notification_item)
[radicale] 2026-03-22T17:30:32.942776662Z File "/venv/lib/python3.12/site-packages/radicale/hook/email/__init__.py", line 987, in _process_event_and_notify
[radicale] 2026-03-22T17:30:32.942785373Z event_end.tzinfo) if event_end.tzinfo else datetime.now() # Handle timezone-aware datetime
[radicale] 2026-03-22T17:30:32.942794009Z ^^^^^^^^^^^^^^^^
[radicale] 2026-03-22T17:30:32.942802327Z AttributeError: 'datetime.date' object has no attribute 'tzinfo'
[radicale] 2026-03-22T17:30:32.947541719Z [2026-03-22 17:30:32 +0000] [7/Thread-21 (process_request_thread)] [WARNING] Precondition failed on PUT request for '/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38/4396ab13-5660-44c5-a198-35e73bb0edc0.ics' (HTTP_IF_NONE_MATCH: *, creation requested but item found with etag: "23859f3d9d6d07040902d0225ce8ed24fbb02777c23fdfa47a67f0221a59b86d")
After disabling email hook, adding all day event is working correctly.
There is my config
[server]
hosts = 0.0.0.0:5232
[auth]
type = htpasswd
htpasswd_filename = /config/users
htpasswd_encryption = autodetect
[storage]
filesystem_folder = /data/collections
[logging]
level = debug
trace_on_debug = True
backtrace_on_debug = True
mask_passwords = True
[hook]
type = email
smtp_server = REDACTED
smtp_port = REDACTED
smtp_security = REDACTED
smtp_username = 'REDACTED'
smtp_password = 'REDACTED'
from_email = 'REDACTED'
And verified item
/data/collections/collection-root/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38 # cat 07dc5278-9463-43de-99a8-ac2c885210df.ics
BEGIN:VCALENDAR
VERSION:2.0
PRODID:DAVx5/4.5.9-ose ical4j/3.2.19
BEGIN:VEVENT
UID:07dc5278-9463-43de-99a8-ac2c885210df
DTSTART;VALUE=DATE:20260324
DTEND;VALUE=DATE:20260325
DTSTAMP:20260322T173030Z
STATUS:CONFIRMED
SUMMARY:All day from phone
BEGIN:VALARM
/data/collections/collection-root/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38 # /venv/bin/radicale --verify-item /data/collections/collection-root/tomasz/8f1e7b
fe-5ab2-f78c-aa3e-0a5def0b6a38/07dc5278-9463-43de-99a8-ac2c885210df.ics
[2026-03-22 17:52:12 +0000] [394] [INFO] Logging of backtrace is disabled in this loglevel
[2026-03-22 17:52:12 +0000] [394] [INFO] Loaded default config
[2026-03-22 17:52:12 +0000] [394] [INFO] Skipped missing/unreadable config file '/etc/radicale/config'
[2026-03-22 17:52:12 +0000] [394] [INFO] Skipped missing/unreadable config file '/root/.config/radicale/config'
[2026-03-22 17:52:12 +0000] [394] [WARNING] No config file found/readable - only default config is active
[2026-03-22 17:52:12 +0000] [394] [INFO] Item verification start using 'stock' encoding: utf-8
[2026-03-22 17:52:12 +0000] [394] [INFO] Verifying item: /data/collections/collection-root/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38/07dc5278-9463-43de-99a8-ac2c885210df.ics
[2026-03-22 17:52:12 +0000] [394] [INFO] Verifying item: /data/collections/collection-root/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38/07dc5278-9463-43de-99a8-ac2c885210df.ics has sha256sum 'c1a0ad497c2add1b8163e2c8ee709b6979948044e35e26c6956596f4ec4d9600'
[2026-03-22 17:52:12 +0000] [394] [INFO] Verifying item: /data/collections/collection-root/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38/07dc5278-9463-43de-99a8-ac2c885210df.ics successful
/data/collections/collection-root/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38 # ^C
/data/collections/collection-root/tomasz/8f1e7bfe-5ab2-f78c-aa3e-0a5def0b6a38 #
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
hook:emailrelated to email (smtp) hook submaintainer: @nwithan8related to email (smtp) hook submaintainer: @nwithan8need:support-by-sub-maintainer