arturtamborski / notion-py

(Fork of) Unofficial Python API client for Notion.so
https://pypi.org/project/notion-py/
MIT License
63 stars 9 forks source link

notion.client.NotionValidationError: Something went wrong. (400) #83

Closed juanpabloaj closed 1 year ago

juanpabloaj commented 1 year ago

with Python 3.10.13 and the example of the README

from notion.client import NotionClient

token = "v02%3Auser_token_or_cookies%3..."

client = NotionClient(token_v2=token)

page = client.get_block(
    "https://www.notion.so/..."
)

print(page.title)

I get the error

notion.client.NotionValidationError: Something went wrong. (400)
juanpabloaj commented 1 year ago

I solved it changing this line from 100000 to 100

https://github.com/arturtamborski/notion-py/blob/f282ad2e0971302f6b6e14e2f029b90987228adf/notion/store.py#L287

I got the solution from here

https://github.com/paperboi/kindle2notion/issues/14