ramnes / notion-sdk-py

The official Notion API client library, but rewritten in Python! (sync + async)

Home Page:https://ramnes.github.io/notion-sdk-py

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image upload error when create a new notion page

hx3333 opened this issue · comments

my_block = [{'image': {'caption': [], 'type': 'external', 'external': {'url': 'https://mmbiz.qpic.cn/mmbiz_gif/YOBosIBzibxFvlzx4aic86IVpzD4hmib8YcaLJgCH1DaMmkMGbD0RDkMDBOUOOvCFEiab9In6tHIAdJicf5Vtk81UHw/640?wx_fmt=gif'}}}]
then raise:
notion_client.errors.APIResponseError: Content creation Failed. Fix the following:
Invalid image url.

I'm not quite sure what the problem is. Although the error message indicates a URL issue, when I directly use this URL to add a page in the Notion client, the image displays normally.Has any friend encountered this problem? Looking forward to kind-hearted people's responses to help me 😢

This error is raised by the API, not notion-sdk-py, so I'm converting this as a discussion.