I am getting this error how to fix it?
# questions
x
I am getting this error how to fix it?
s
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
yes
I read that part but the error I Am getting is not the same
this my config.personal.task.yml
s
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
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
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
I did it like this and still getting the same error
s
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
{"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
Hey @User , Do you have a field name
DendronId
in your Airtable?
x
Yes
j
I was able to repro this error only if the table in Airtable does not have a field name `DendronId`(case-sensitive).
x
ahh!!! the the d in Id was in cap
It works now
🤦‍♂️
thanks for the support @User @User
4 Views