Closed Nocommas555 closed 4 years ago
That's interesting, it looks as if the prop didn't have a block ID? Thanks for the report (and sorry for a late reply), I'll look at it.
Hi @arturtamborski Did you have a chance to fix the issue in #41 merge? Looks like I have same problem. I would like to switch to you fork and this is the only blocker for me.
I'll have it on my list but first I have to fix the collections in general.
The same thing, I tracked the error exactly as what was done by @Nocommas555
this is now fixed in release 0.0.5.
import os
from notion.client import NotionClient
client = NotionClient(os.environ["NOTION_TOKEN_V2"])
page = client.get_block(os.environ["NOTION_PAGE_URL"])
cvb = page.children[1]
crb = cvb.collection.get_rows()[0]
print(crb.get_all_properties())
{'qqq': ['qeqwe'], 'asd': 'asdad'}
(tagging @divinites, @todaysday, @Nocommas555 for notifications)
I moved from a different fork of notion-py and some code broke
I looked around a bit, and found that the problem is deeper - in /notion/collection.py, convert_notion_to_python, 465: for i, part in enumerate(val):
Therefore, this val == None
The function got this Val from from get_property, line 404 val = self.get(["properties", prop["id"]])
The .get is from the Record class, but i don't know what goes wrong there
Edit: translated into english