strava2notion icon indicating copy to clipboard operation
strava2notion copied to clipboard

Unable to access notion pages

Open DhruvaKumar opened this issue 3 years ago • 1 comments

Hi, thanks for creating this repo!

I tried running the scripts and I was able to access my Strava data but unable to add it Notion. The error I'm getting is in the notion client of accessing the top-level pages.

...
Fetched 9, the latests is on 2022-03-13 17:47:32+00:00
Traceback (most recent call last):
  File "/home/user/strava2notion/strava_api.py", line 15, in <module>
    table = notion.create_activity_log_table()
  File "/home/user/strava2notion/notion_api.py", line 31, in create_activity_log_table
    strava_page = self.get_strava_page()
  File "/home/user/strava2notion/notion_api.py", line 18, in get_strava_page
    for page in self.client.get_top_level_pages():
  File "/home/user/anaconda3/envs/notionstrava/lib/python3.10/site-packages/notion/client.py", line 109, in get_top_level_pages
    return [self.get_block(bid) for bid in records["block"].keys()]
KeyError: 'block'

Would you happen to know what might cause this?

DhruvaKumar avatar Mar 15 '22 03:03 DhruvaKumar

Hi @DhruvaKumar, glad you're enjoying the repo and YouTube video!

This is using an unofficial notion API so there is no guarantee this will always work. Your best workaround would be to use the official notion API here.

IVIURRAY avatar Mar 15 '22 09:03 IVIURRAY