Hi there, I am trying to create a google calendar event.
class GoogleIntentHandler(AbstractRequestHandler):
def can_handle(self, handler_input):
return ask_utils.is_intent_name("GoogleIntent")(handler_input)
def handle(self, handler_input):
#LOP = request.Session.User.AccessToken
accessToken = handler_input.request_envelope.context.System.user.access_token
global service
service = build('calendar', 'v3', credentials=accessToken)
event = {
'summary': 'Test',
'location': 'At home',
'description': 'A chance to hear more about Google\'s developer products.',
'start': {
'dateTime': '2020-07-29T12:12:10',
'timeZone': 'America/Los_Angeles',
},
'end': {
'dateTime': '2020-07-29T12:32:47',
'timeZone': 'America/Los_Angeles',
}
}
#check if you can call a color via the api too
event = service.events().insert(calendarId='primary', body=event).execute()
return (
handler_input.response_builder
.speak(speak_output)
)
However, I am getting
{
"errorMessage": "'NoneType' object has no attribute 'system'",
"errorType": "AttributeError",
"stackTrace": [
" File \"/opt/python/ask_sdk_core/skill_builder.py\", line 111, in wrapper\n response_envelope = skill.invoke(\n",
" File \"/opt/python/ask_sdk_core/skill.py\", line 181, in invoke\n api_token = request_envelope.context.system.api_access_token\n"
]
}
I believe the skill_builder & builder lib isn't working well. Could you please look into it?
Hi there, I am trying to create a google calendar event.
However, I am getting
I believe the skill_builder & builder lib isn't working well. Could you please look into it?