-
I have a service account through which I was success fully able to get the events from the GOOGLE CALENDAR API. But somehow I am only getting one event from the from gcsa.google_calendar import GoogleCalendar
from google.oauth2 import service_account
CALENDAR_ID=['[email protected]', '[email protected]']
SCOPES = ['https://www.googleapis.com/auth/calendar']
SERVICE_ACCOUNT_FILE = 'client_secrets2.json'
for CAL_ID in CALENDAR_ID:
# authorize
credentials = service_account.Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES)
calendar_auth = GoogleCalendar(CAL_ID, credentials=credentials)
# get today and tomorrow's events
calendar_events = calendar_auth.get_events(single_events=True, order_by='startTime')
for event in calendar_events:
print(event)
What should be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Could you please share how you got events from GOOGLE CALENDAR API, what events did you get, and what events you get with GCSA? |
Beta Was this translation helpful? Give feedback.
-
The error was due to the character length set in database for storing the event summary |
Beta Was this translation helpful? Give feedback.
The error was due to the character length set in database for storing the event summary
event.summary