Creating Database entries #227
-
Potentially associated with #218 I'm making a notion database that I need to push a lot of data in different properties/formats. I've used code examples/discussion solutions, but can't seem to get past errors similar to those in discussion/issue #218 - one of my issues (color) is a select property for the page that I couldn't get to work. I'm not sure if this is all an API issue/if that's been fixed since it was first raised, or just incorrect code on my part. I'd appreciate any thoughts and feedback! Database Creation Code (functional, no errors):
Page creation code (the commented out sections are marked as functional/nonfunctional - this is the source of errors):
Test variables for page creation code (sample inputs, returns the errors below):
Resulting errors (just a sample, different but similar body-failed-validation error from each):
Any help would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The error is raised by Notion's API (not the Python client), and is quite explicit:
The The documentation for this kind of property shows examples of what they're waiting for: https://developers.notion.com/reference/page-property-values#date IIRC Notion only gives errors for one field at a time. So when you have validation errors with Notion's API:
|
Beta Was this translation helpful? Give feedback.
The error is raised by Notion's API (not the Python client), and is quite explicit:
The
date
fields don't expect a list of objects with atext
key.The documentation for this kind of property shows examples of what they're waiting for: https://developers.notion.com/reference/page-property-values#date
IIRC Notion only gives errors for one field at a time. So when you have validation errors with Notion's API: