0
I’m trying to insert events in Google calendar, via Python script, but I think a library is missing, because when I run the script the following error appears
name error named 'service' is not defined
Script I am running
event = {
'summary': 'Google I/O 2015',
'location': '800 Howard St., San Francisco, CA 94103',
'description': 'A chance to hear more about Google\'s developer products.',
'start': {
'dateTime': '2020-05-28T09:00:00-07:00',
'timeZone': 'America/Brasil',
},
'end': {
'dateTime': '2015-05-28T17:00:00-07:00',
'timeZone': 'America/Brasil',
},
'recurrence': [
'RRULE:FREQ=DAILY;COUNT=2'
],
'attendees': [
{'email': '[email protected]'},
{'email': '[email protected]'},
],
'reminders': {
'useDefault': False,
'overrides': [
{'method': 'email', 'minutes': 24 * 60},
{'method': 'popup', 'minutes': 10},
],
},
}
event = service.events().insert(calendarId='primary', body=event).execute()
print('evento criado com sucesso')
Can anyone help me?? Please do not exclude my question
Put the whole code, by mistake you’re saying that the service is not declared!
– Juan Caio