markdowndb icon indicating copy to clipboard operation
markdowndb copied to clipboard

Wrong table name when trying to insert tags data

Open ngirard opened this issue 1 year ago • 3 comments

Using latest MarkdownDB version on Ubuntu 23.04.

Got the following error:

[Error: insert into `tags` (`name`) select 'Actionnable/Type/Activit' as `name` 
union all select 'Actionnable/Type/Activité' as `name` 
union all select 'Autodirection/Suivi_d_ex' as `name` 
union all select 'Chronologie' as `name` ... 
union all select 'Actionnable/Type/T' as `name` 
union all select 'Actionnable/Priorit' as `name` 
union all select 'actionable/objectif-mesurable' as `name` 
union all select 'actionable/projet' as `name` 
union all select 'projet' as `name` 
union all select 'Priorit' as `name` ... 
union all select 'AI' as `name` - SQLITE_ERROR: no such table: tags] {
  errno: 1,
  code: 'SQLITE_ERROR'
}

tags appears to be used in this statement, while the sqlite file contains such file_tags table.

ngirard avatar Jan 02 '24 18:01 ngirard

@ngirard I think you are using a Next.js application or running markdownDB from the CLI, right?

mohamedsalem401 avatar Jan 04 '24 22:01 mohamedsalem401

Hey @mohamedsalem401, indeed, I followed the README and just ran

npx mddb --watch ~/Obsidian

Are there alternative ways of running MarkdownDB ?

ngirard avatar Jan 05 '24 05:01 ngirard

@ngirard Sorry for the late response. Can you try running this in a separate terminal? I think you have to do this until the issue is fixed. The issue is caused because you might be running the command with another ongoing process like npm run dev & npx mddb --watch ~/Obsidian.

mohamedsalem401 avatar Feb 16 '24 11:02 mohamedsalem401

FIXED.

rufuspollock avatar Mar 10 '25 11:03 rufuspollock