notional icon indicating copy to clipboard operation
notional copied to clipboard

Notion Children Length exceeded when parsing large HTML

Open dominiczy opened this issue 1 year ago • 1 comments

Notional Version: 0.7.3

Description

On parsing a large HTML document to notion content, I get the following error:

notion_client.errors.APIResponseError: body failed validation: body.children.length should be ≤ 100, instead was 123.

A clear and concise description of what the bug is.

Steps To Reproduce

If html is a reasonably large (eg blog article sized) document, we can reproduce this error like this:

from notional.parser import HtmlParser
parser.parse(html)

Expected Behavior

The html is correctly parsed to notion

dominiczy avatar Sep 05 '23 05:09 dominiczy

@dominiczy Notion doesn't allow you to send >100 children per API request. Use the Append Block Children api and send the content in chunks.

turnerhusa avatar Oct 04 '23 20:10 turnerhusa