akarri2001 / Notion-and-Google-Calendar-2-Way-Sync

2 Way Sync Between Notion Database and Google Calendar
GNU General Public License v3.0
354 stars 51 forks source link

ValueError and 404Error GoogleAPI #30

Closed echoTraum closed 8 months ago

echoTraum commented 1 year ago

ValueError and 404Error GoogleAPI

HttpError 404 when requesting (https://www.googleapis.com/calendar/v3/calendars)

File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\googleapiclient\http.py", line 935, in execute raise HttpError(resp, content, uri=self.uri) googleapiclient.errors.HttpError: <HttpError 404 when requesting https://www.googleapis.com/calendar/v3/calendars/6cw0v*************group.calendar.google.com/events/7b52796dfobjgijp9vlv8cf80s/move?destination=fd34893uklhjdflgkjsdafdfjklsd%40group.calendar.google.com&alt=json returned "Not Found". Details: "[{'domain': 'global', 'reason': 'notFound', 'message': 'Not Found'}]">

and During handling of the above exception, another exception occurred:

ValueError("unconverted data remains: %s":

File "C:\Users\User\***\Notion-and-Google-Calendar-2-Way-Sync-main/Notion-GCal-2WaySync-Public.py", line 762, in <module> calEventId = upDateCalEvent(TaskNames[i], makeEventDescription(Initiatives[i], ExtraInfo[i]), datetime.strptime(start_Dates[i], '%Y-%m-%d'), URL_list[i], updatingCalEventIds[i], datetime.strptime(end_Times[i], '%Y-%m-%d'), CurrentCalList[i], CalendarList[i]) File "C:\Users\User\AppData\Local\Programs\Python\Python3.9/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "C:\Users\User\AppData\Local\Programs\Python\Python3.9/_strptime.py", line 352, in _strptime raise ValueError("unconverted data remains: %s" % ValueError: unconverted data remains: [T00:00:00.000+02:00](url)

Odradek77 commented 11 months ago

The code worked after adding more authorizations in the GCal API that were related to modifying the Calendar and view events. I didn't add all, just the ones that made sense to me.

Also the calendars didn't sync until I modified the "Multiple Calendar" Section, removed the example calendar info and added a calendar of my own, and turned the second calendar info into a comment, just to keep it there in case I need it in the future.

Hope this helps.