While attempting to import iCal export (.ics) files into Google Calendar, I’ve encountered the following errors:
- Failed to import events: Unable to process your iCal/CSV file. (Google, Bing)
- HTTP/1.1 403 Google Calendar doesn’t support storing of “To Do” (VTODO) components (Google, Bing)
It appears as though Google Calendar is choking on both the VTODO and VALARM stanzas within the export file.
VTODO data is easy to remove, as it will appear near the end of the export file. Find the first instance of “BEGIN:VTODO,” and remove all data beginning with that line and ending with the final “END:VTODO” instance (take care not to delete the “END:VCALENDAR” line, as it will invalidate the export).
VALARM data is problematic, as it is nested within each VEVENT stanza. Depending on the size of the export file, it could easily contain hundreds or thousands of these.
The fast and dirty solution is to remove these elements from the iCal export file, and then import the “clean” version into Google Calendar. Note that imported events in the target Google Calendar will no longer contain alarms–these events will need to be updated manually, if desired.
Following is a simple Python script that will remove these stanzas and produce a new file that should import properly. After downloading, be sure to edit the INFILE variable at a minimum.
Head on over to Code for the latest version (iCal-to-GCal).
It’s worth noting that this script can be used to quickly remove data from any file that contains similarly-formatted information. Just update the TAGS list accordingly.
UPDATE01: Wondering whether the integration of Tasks into Google Calendar will alleviate the VTODO handling issue?