KeyError: 'summary'
Closed this issue · 4 comments
adambarnett52 commented
Hi,
I have started to get this error
Traceback (most recent call last):
File "ical_to_gcal_sync.py", line 174, in <module>
name = gcal_event['summary']
KeyError: 'summary'
How can i trace back what is causing it
andrewramsay commented
Well the 'summary' field is supposed to contain the event name, do you have any Google calendar events that don't have a name/title set? You can try adding a print(gcal_event)
on the previous line to see what's actually contained in each gcal_event object.
If it is just as simple as some of the Google events not having names then I can modify the script to fix that... the 'name' lookup isn't actually being used for anything much in that block of code anyway.
adambarnett52 commented
Oh, yeh, i was testing in gcal and made an event without a name
It deleted it but did not empty the trash
Thanks
Adam
…On Thu, Oct 31, 2019 at 1:14 PM Andrew Ramsay ***@***.***> wrote:
Well the 'summary' field is supposed to contain the event name, do you
have any Google calendar events that don't have a name/title set? You can
try adding a print(gcal_event) on the previous line to see what's
actually contained in each gcal_event object.
If it is just as simple as some of the Google events not having names then
I can modify the script to fix that... the 'name' lookup isn't actually
being used for anything much in that block of code anyway.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6?email_source=notifications&email_token=ABKXAE7BXXBAXBX456D6EPDQRLKZ5A5CNFSM4JHJALR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECXW6UI#issuecomment-548368209>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKXAE3VO645NRYN5K4IM33QRLKZ5ANCNFSM4JHJALRQ>
.
--
Adam Barnett
andrewramsay commented
OK, I'll add a quick fix for this in case anyone else runs into the same problem.
andrewramsay commented
should be fixed in d5a6865