notion-py icon indicating copy to clipboard operation
notion-py copied to clipboard

Why the collection would be a str?

Open highseaz opened this issue 3 years ago • 3 comments

Hello @jamalex , thank you so much for creating notion API in python. but why I got the following error?

3 cv = client.get_collection_view('ba4107d1-d71c-45e9-8a40-452bef70a097',"ca844557-2d18-4d5d-a2d1-741d110946e8") 4 print(cv) ----> 5 for row in cv.collection.get_rows(): 6 print(row) 7

AttributeError: 'str' object has no attribute 'get_rows'


Why the collection would be a str, but the print(cv) functions well and outputs "id='ba4107d1-d71c-45e9-8a40-452bef70a097'"? Quite confused and what can i do?

highseaz avatar May 14 '21 02:05 highseaz

Seems that they've changed something in their API, but I don't think that it is good idea to search a bug here in sources, as yesterday Notion released their official API in public beta.

mixeden avatar May 14 '21 06:05 mixeden

Mbe someone will fork this notion-py and change everything up to their docs? As far as I've seen, Notion doesn't have official SDK for python, so we have to implement something on our own anyway

mixeden avatar May 14 '21 06:05 mixeden

their public API currently only supports few basic text blocks. no dividers, images, embeds or widgets; also no editing of block attributes.

as of 2021-06-07 this client remains superb to the public SDK. however we'll see how things evolve in the coming months.

vintlucky777 avatar Jun 07 '21 23:06 vintlucky777