Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 谷歌课堂活动不';谷歌日历api上没有显示_Python_Google Api Python Client - Fatal编程技术网

Python 谷歌课堂活动不';谷歌日历api上没有显示

Python 谷歌课堂活动不';谷歌日历api上没有显示,python,google-api-python-client,Python,Google Api Python Client,我正在尝试编写一个程序,获取下周的谷歌日历事件并列出它们 但当我运行代码时,它只显示我手动创建的事件,而不显示假日和谷歌课堂作业等事件 这是密码 events_result = service.events().list(calendarId='primary', timeMin=now, timeMax=in_a_week, singleEvents=True, orderBy='startTime').execute() events = events_result.get('items',

我正在尝试编写一个程序,获取下周的谷歌日历事件并列出它们 但当我运行代码时,它只显示我手动创建的事件,而不显示假日和谷歌课堂作业等事件

这是密码

events_result = service.events().list(calendarId='primary', timeMin=now, timeMax=in_a_week, singleEvents=True, orderBy='startTime').execute()
events = events_result.get('items', [])

if not events:
    print('No upcoming events found.')
for event in events:
    start = event['start'].get('dateTime', event['start'].get('date'))
    yield (start, event["summary"])
这是输出

No upcoming events found.
我检查了datetime对象,它们可以处理手动创建的事件

我该怎么办