ramnes / notion-sdk-py

The official Notion API client library, but rewritten in Python! (sync + async)
https://ramnes.github.io/notion-sdk-py
MIT License
1.8k stars 141 forks source link

Image upload error when create a new notion page #214

Closed hx3333 closed 11 months ago

hx3333 commented 11 months ago

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 😢

ramnes commented 11 months ago

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