notion-py
notion-py copied to clipboard
429 Too Many Requests Error
Requesting a certain amount of 'loadpagechunk' will result in '429 Too Many Requests Error'.
It didn't happen before, but this error has occurred since recently.
I'm having the same error, even when loading only a few blocks of content. I've been able to (sort of) work around this with:
import time
import notion
def do_notion_stuff():
try:
# Actions that use loadpagechunk
catch Exception as e:
print(e)
time.sleep(10)
do_notion_stuff()
However, this results in extremely slow load times for most programs, so a fix would be great.
I found an API that can replace 'loadPageChunk'.
def getPageMap(blockId): #blockId => 12345678-1234-1234-1234-123456789012
param = {
"requests":[
{
"table":"block",
"id":blockId,
"version": -1
}
]
}
res = client.post("syncRecordValues",param).json()
return res["recordMap"]["block"][blockId]["value"] # == client.get_block().get()
'syncRecordValues' also has a 429 Error, but is less restrictive than 'loadPageChunk'.
I'm currently experiencing the exact same issue. Any idea how to fix this? :)
I'm also getting this error when trying to init a client using my email and password.
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://www.notion.so/api/v3/loginWithEmail
I'm getting this error when importing the records from md files to notion.
I am getting this err too
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://www.notion.so/api/v3/loadUserContent
I solved it by putting a time.sleep(5). It doesn't work perfectly, but enough to make use of the algorithm.
Le mar. 10 janv. 2023 à 21:34, Eikosa @.***> a écrit :
I am getting this err too requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://www.notion.so/api/v3/loadUserContent
— Reply to this email directly, view it on GitHub https://github.com/jamalex/notion-py/issues/296#issuecomment-1377813772, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKOQG63D2EWNCFF4HXFFKOTWRXBUBANCNFSM4YYX3PQA . You are receiving this because you commented.Message ID: @.***>
Is there some place where api/v3 is described?
Actually, this one /api/v3/loginWithEmail
Because i'm getting 403