pimutils / vdirsyncer

📇 Synchronize calendars and contacts.
https://vdirsyncer.pimutils.org/
Other
1.57k stars 163 forks source link

Tripcase imported ics does not sync to radicale #806

Open heluani opened 5 years ago

heluani commented 5 years ago

vdirsyncer, version 0.16.7 radicale version 2.1.11 $ uname -a Linux rye 5.3.7-arch1-1-ARCH #1 SMP PREEMPT Fri Oct 18 00:17:03 UTC 2019 x86_64 GNU/Linux

When trying to sync an ics imported from tripcase, I find the following trace, I am not sure if this should be reported here, or on radicale. The ics in the put statement below is untouched.

debug: Sending request...
debug: 400
debug: {'Date': 'Tue, 29 Oct 2019 10:55:49 GMT', 'Server': 'Apache', 'Content-Length': '31', 'Content-Encoding': 'gzip', 'Connection': 'close', 'Content-Type': 'text/plain; charset=utf-8'}
debug: b'Bad Request'
error: Unknown error occured for heluani_calendar/home: 400 Client Error: Bad Request for url: https://radicale.myserver.net/user/home/trip_item_1063126525.ics
error: Use `-vdebug` to see the full traceback.
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/cli/utils.py", line 74, in handle_cli_error
debug:     raise e
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/__init__.py", line 153, in sync
debug:     partial_sync
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/__init__.py", line 177, in run
debug:     self._run_impl(a, b)
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/__init__.py", line 204, in _run_impl
debug:     href, etag = self.dest.storage.upload(self.item)
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/storage/base.py", line 15, in inner
debug:     return f(self, *args, **kwargs)
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/storage/base.py", line 15, in inner
debug:     return f(self, *args, **kwargs)
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/storage/dav.py", line 551, in upload
debug:     return self._put(href, item, None)
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/storage/dav.py", line 520, in _put
debug:     headers=headers
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/storage/dav.py", line 390, in request
debug:     return http.request(method, url, session=self._session, **more)
debug:   File "/usr/lib/python3.7/site-packages/vdirsyncer/http.py", line 163, in request
debug:     r.raise_for_status()
debug:   File "/usr/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
debug:     raise HTTPError(http_error_msg, response=self)
Copying (uploading) item trip_item_1063126526 to user_calendar_remote/home
debug: Normalized URL from 'trip_item_1063126526.ics' to '/user/home/trip_item_1063126526.ics'
debug: PUT https://radicale.myserver/user/home/trip_item_1063126526.ics
debug: {'User-Agent': 'vdirsyncer/0.16.7', 'Content-Type': 'text/calendar', 'If-None-Match': '*'}
debug: b'BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN\r\nBEGIN:VTIMEZONE\r\nTZID;X-RICAL-TZSOURCE=TZINFO:America/Sao_Paulo\r\nBEGIN:DAYLIGHT\r\nDTSTART:20191103T000000\r\nRDATE:20191103T000000\r\nTZNAME:-02\r\nTZOFFSETFROM:-0300\r\nTZOFFSETTO:-0200\r\nEND:DAYLIGHT\r\nEND:VTIMEZONE\r\nBEGIN:VTIMEZONE\r\nTZID;X-RICAL-TZSOURCE=TZINFO:America/Argentina/Buenos_Aires\r\nBEGIN:STANDARD\r\nDTSTART:20090315T000000\r\nRDATE:20090315T000000\r\nTZNAME:-03\r\nTZOFFSETFROM:-0200\r\nTZOFFSETTO:-0300\r\nEND:STANDARD\r\nEND:VTIMEZONE\r\nBEGIN:VEVENT\r\nSUMMARY:AR Flight 1250 from EZE \r\nDTSTART;TZID=America/Argentina/Buenos_Aires;VALUE=DATE-TIME:20200108T15150\r\n 0\r\nDTEND;TZID=America/Sao_Paulo;VALUE=DATE-TIME:20200108T181500\r\nDTSTAMP;VALUE=DATE-TIME:20191029T101844Z\r\nUID:trip_item_1063126526\r\nSEQUENCE:7\r\nDESCRIPTION:TripCase Trip:\\nTucuman\\nEZE Jan 08\\, 2020 3:15 PM\\nGIG Jan 08\r\n \\, 2020 6:15 PM\\nSeats: 04F\\n\\nhttps://www.tripcase.com/trips/341666502\\n\\\r\n n \\n\r\nTRANSP:TRANSPARENT\r\nURL:https://www.tripcase.com/trips/341666502\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n'
heluani commented 5 years ago

I suppose this goes in radicale, I apologize for the noise. The unsupported feature is the X-RICAL-TZSOURCE=TZINFO/ in the TZID:.... I just removed that and the files synced without trouble