https://www.dendron.so/ logo
x

Xanaus

02/16/2022, 12:09 AM
I am getting this error how to fix it?
s

ScriptAutomate

02/16/2022, 12:36 AM
This is when working to export with Airtable? That may be a version of the troubleshooting issue seen here: https://wiki.dendron.so/notes/oTW7BFzKIlOd6iQnnNulg/#troubleshooting
Though, we should improve the error message output 😅
x

Xanaus

02/16/2022, 1:12 AM
yes
I read that part but the error I Am getting is not the same
this my config.personal.task.yml
s

ScriptAutomate

02/16/2022, 3:45 AM
Ah, we have an PR in the works right now to help with this message output: https://github.com/dendronhq/dendron/pull/2426 This likely has to do with some kind of tag mismatch with your local notes and field values inside of Airtable. I'd have to see an example note you are trying to export to Airtable.
What does your
sourceFieldMapping
look like in your
config.personal.tasks
file? Example:
Copy code
yaml
sourceFieldMapping: {
  DendronId: id, 
  Name: title,
  Description: desc,
  Notes: {to: body, type: string},
  Owner: owner,
  Type: {type: "singleSelect", filter: "tags.type.*", to: "tags"},
  Status: status,
  Due: due,
  Priority: priority,
}
And: - In Airtable, what are the field types for: - status - priority - owner - Are they
singleSelect
in Airtable, or are they
Single line text
? Also note: In
sourceFieldMapping
, the
key: value
is a reflection of
AirtableField: DendronFrontmatterKey
It looks like your error is being caused by one of your task note frontmatter fields not mapping properly
x

Xanaus

02/17/2022, 12:39 AM
Copy code
sourceFieldMapping: {
  DendronId: id, 
  Name: title,
  Description: desc,
  # Special type here refers to body of your note, the markdown
  Notes: {to: body, type: string},
  Owner: owner,
  # singleSelect type, targeting tag using `#type.*` format
  Type: {type: "singleSelect", filter: "tags.type.*", to: "tags"},
  Status: status,
  # use yyyy-mm-dd format (ISO) for this example
  Due: due,
  Priority: priority,
}
s

ScriptAutomate

02/17/2022, 3:46 PM
Ah, okay, it looks like Airtable fields won't expect empty fields unless you specifically add empty field options in
single select
configs. To do this: - For status field in Airtable - Customize field type - Add a new option that has an empty value - Repeat for Priority - Repeat for Owner - Repeat for Type See if that allows you to then export
x

Xanaus

02/19/2022, 1:16 AM
I did it like this and still getting the same error
s

ScriptAutomate

02/19/2022, 1:24 AM
When it fails to export, can you run the
Dendron:Dev: Open Logs
and look for lines like:
Copy code
Finished Airtable Export. 0 records created; 0 records updated. Error encountered...
I'd like to know what these lines include, since that should show us why it is failing
x

Xanaus

02/20/2022, 12:20 AM
{"level":50,"time":1645316367145,"pid":23067,"hostname":"fiona","name":"dendron","msg":"Finished Airtable Export. 0 records created; 0 records updated. Error encountered: {\"payload\":[{\"message\":\"Error during Airtable Export. undefined\",\"name\":\"DendronError\",\"status\":\"unknown\",\"payload\":\"[{\\\"fields\\\":{\\\"DendronId\\\":\\\"uLQiGcJzOPi29hWai1a8w\\\",\\\"Name\\\":\\\"Cut\\\",\\\"Description\\\":\\\"\\\",\\\"Notes\\\":\\\"\\\\n## Summary\\\\n\\\\nWhoa! This is a test!\\\\n\\\\n## Details\\\\n\\\\nThe Sun is hungry. Planet-eating hungry.\\\\n\\\",\\\"Owner\\\":\\\"Ivan\\\",\\\"Status\\\":\\\"\\\",\\\"Due\\\":\\\"2022-02-17\\\",\\\"Priority\\\":\\\"\\\"}}]\",\"innerError\":{\"error\":\"UNKNOWN_FIELD_NAME\",\"message\":\"Unknown field name: \\\"DendronId\\\"\",\"statusCode\":422}}],\"errors\":[{\"name\":\"DendronError\",\"status\":\"unknown\",\"payload\":\"[{\\\"fields\\\":{\\\"DendronId\\\":\\\"uLQiGcJzOPi29hWai1a8w\\\",\\\"Name\\\":\\\"Cut\\\",\\\"Description\\\":\\\"\\\",\\\"Notes\\\":\\\"\\\\n## Summary\\\\n\\\\nWhoa! This is a test!\\\\n\\\\n## Details\\\\n\\\\nThe Sun is hungry. Planet-eating hungry.\\\\n\\\",\\\"Owner\\\":\\\"Ivan\\\",\\\"Status\\\":\\\"\\\",\\\"Due\\\":\\\"2022-02-17\\\",\\\"Priority\\\":\\\"\\\"}}]\",\"innerError\":{\"error\":\"UNKNOWN_FIELD_NAME\",\"message\":\"Unknown field name: \\\"DendronId\\\"\",\"statusCode\":422}}],\"message\":\"Error during Airtable Export. undefined\"}"}
j

Joshi

02/21/2022, 7:11 AM
Hey @User , Do you have a field name
DendronId
in your Airtable?
x

Xanaus

02/21/2022, 10:46 AM
Yes
j

Joshi

02/21/2022, 11:27 AM
I was able to repro this error only if the table in Airtable does not have a field name `DendronId`(case-sensitive).
x

Xanaus

02/21/2022, 2:40 PM
ahh!!! the the d in Id was in cap
It works now
🤦‍♂️
thanks for the support @User @User
4 Views