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

get_all_properties throws and error

Open ivanistheone opened this issue 5 years ago • 3 comments

error AttributeError: 'NoneType' object has no attribute 'startswith'

import os
from notion.client import NotionClient
token = os.environ.get("NOTION_TOKEN")
PROJECT_COLLECTION = "<id of a collection>"

client = NotionClient(token, monitor=False)
collection = client.get_collection(PROJECT_COLLECTION)
projects = collection.get_rows()
project = projects[0]
project.get_all_properties()  # <<<<

ivanistheone avatar May 02 '20 14:05 ivanistheone

I faced same error too

ehdgua01 avatar Jun 27 '20 10:06 ehdgua01

Same here.

nanpuhaha avatar Aug 16 '20 05:08 nanpuhaha

Same here. It happens on Person property. I ended up excluding created_by type of properties.

callzhang avatar Jan 14 '21 09:01 callzhang