martian
martian copied to clipboard
table block not working
Hello, thanks for maintaining this tool. 🙏
I am trying to create a basic table, but am unable to do so. My table looks like this:
| Date | Exercise |
|------------|---------------|
| 27.08.2022 | exercise 0 |
| 30.08.2022 | exercise 1 |
| 01.09.2022 | exercise 2 |
| 02.09.2022 | exercise 3 |
However the request fails with:
@notionhq/client warn: request fail {
code: 'validation_error',
message: 'body failed validation: body.children[21].table.table-width should be not present, instead was `5`.'
}
/**Path**/node_modules/@notionhq/client/build/src/errors.js:162
return new APIResponseError({
^
APIResponseError: body failed validation: body.children[21].table.table-width should be not present, instead was `5`.
I am using markdownToBlocks
function with package versions:
"@notionhq/client": "2.2.0",
"@tryfabric/martian": "1.2.4",
Anyone else facing similar issue?
trouble with table:
{
"object": "block",
"type": "table",
"table": {
"table_width": 3,
"has_column_header": true,
"children": [
{
"object": "block",
"type": "table_row",
"table_row": {
"cells": [
[
{
"type": "text",
"annotations": {
"bold": false,
"strikethrough": false,
"underline": false,
"italic": false,
"code": false,
"color": "default"
},
"text": { "content": "CFG scale" }
}
],
[
{
"type": "text",
"annotations": {
"bold": false,
"strikethrough": false,
"underline": false,
"italic": false,
"code": false,
"color": "default"
},
"text": { "content": "8" }
}
],
[
{
"type": "text",
"annotations": {
"bold": false,
"strikethrough": false,
"underline": false,
"italic": false,
"code": false,
"color": "default"
},
"text": {
"content": "test"
}
}
]
]
}
}
]
}
}
body failed validation. Fix one:
body.children[0].paragraph.children[0].embed should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].bookmark should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].image should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].video should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].pdf should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].file should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].audio should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].code should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].equation should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].divider should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].breadcrumb should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].table_of_contents should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].link_to_page should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].table_row should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].heading_1 should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].heading_2 should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].heading_3 should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].paragraph should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].bulleted_list_item should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].numbered_list_item should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].quote should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].to_do should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].toggle should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].template should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].callout should be defined, instead was `undefined`.
body.children[0].paragraph.children[0].synced_block should be defined, instead was `undefined`.