-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
collection.add_row() fails on new databases #367
Comments
knightjoel
added a commit
to knightjoel/notion-py
that referenced
this issue
Mar 23, 2022
It appears something change in the Notion API which causes errors when working with recently created databases. This results in being unable to find the `collection_id` of a `CollectionViewBlock` which has downstream affects such as exceptions when trying to access the `title` property of the database and being unable to add rows to the collection. This commit changes how the `collection_id` is retrieved within the `CollectionViewBlock` class such that the lookup succeeds for newish and oldish databases. Fixes jamalex#367
Unsure what changed in the API, however after inspecting how the module is storing information about collections, I noted the collection_id is available via a different key. The linked patch works for me but I've only done very light testing. Care to give it a try? |
@knightjoel Your fix works to solve the issue. |
vzhd1701
pushed a commit
to vzhd1701/notion-py
that referenced
this issue
May 9, 2022
It appears something change in the Notion API which causes errors when working with recently created databases. This results in being unable to find the `collection_id` of a `CollectionViewBlock` which has downstream affects such as exceptions when trying to access the `title` property of the database and being unable to add rows to the collection. This commit changes how the `collection_id` is retrieved within the `CollectionViewBlock` class such that the lookup succeeds for newish and oldish databases. Fixes jamalex#367
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like the latest Notion updates have broken even the newest forks of this project.
collection.add_row()
works fine on existing databases, but if you create a new database,collection
comes back asNoneType
.The text was updated successfully, but these errors were encountered: