Notion-and-Google-Calendar-2-Way-Sync
Notion-and-Google-Calendar-2-Way-Sync copied to clipboard
Cannot run the file
I did exactly what the tutorial says but when I run "python3 Notion-GCal-2WaySync-Public.py" it says the following. What should I do now?
File "/home/lelouvincx/.local/lib/python3.9/site-packages/notion_client/client.py", line 83, in _parse_response
response.raise_for_status()
File "/home/lelouvincx/.local/lib/python3.9/site-packages/httpx/_models.py", line 1105, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: 404 Client Error: Not Found for url: https://api.notion.com/v1/databases/3b58b006436c477e85c500fb2a41152f/query
For more information check: https://httpstatuses.com/404
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/lelouvincx/Documents/NotionXGCalendar/Notion-GCal-2WaySync-Public.py", line 394, in <module>
my_page = notion.databases.query( #this query will return a dictionary that we will parse for information that we want
File "/home/lelouvincx/.local/lib/python3.9/site-packages/notion_client/api_endpoints.py", line 46, in query
return self.parent.request(
File "/home/lelouvincx/.local/lib/python3.9/site-packages/notion_client/client.py", line 133, in request
return self._parse_response(response)
File "/home/lelouvincx/.local/lib/python3.9/site-packages/notion_client/client.py", line 93, in _parse_response
raise APIResponseError(error.response, body)
notion_client.errors.APIResponseError: Could not find database with ID: 3b58b006-436c-477e-85c5-00fb2a41152f.```
I too have encountered the same issue. Tried
- Updating notion-client to 0.7
- Checking with another database
- Creating new integration
Okay got it! This error comes when you have not shared your integration with the database in notion. Even if your database id, Notion Integration token is correct, you need to link both of them together. For that
- Head over to Notion and open up the database which you want to integrate with GCal
Click on that share button on the top right side
Click Add People
3.
Click the integration it will get access to the database
4.

Click Invite. Now you are good to go.