reuseman / flashcards-obsidian

🎴 An Anki plugin for Obsidian.md
MIT License
872 stars 86 forks source link

Error when creating new card with #card syntax #98

Open willemodendaal opened 2 years ago

willemodendaal commented 2 years ago

Describe the bug When I sync #card to Anki I get an error stating that the card was not inserted "Error, could not add..." and "Inserted successfully 0/1 cards."

To Reproduce

  1. Use flashcards plugin v1.6.3 (latest at time of writing)
  2. Give access to Anki. (Anki using AnkiConnect plugin)
  3. Create a new note (not in a folder, just in the root)
  4. Add the following contents:
---
cards-deck: Default
aliases:[]
---
#ungroomed #2022-03

# How to list custom hex repos on machine #card 
Run `mix hex.repo list`
  1. Open the command palette and run "Flashcards: Generate for current file"
  2. See error message, "Error, could not insert..."

Additional context If I look at the console, the following new card is being added (note lack of "id", not sure if that's a problem?)

image

Also, if I define an inline card in the same document, eg. Test123::test, the inline card syncs without any issue.

Please help? Would really like to use this plugin.

github-actions[bot] commented 2 years ago

Thank you for taking the time to report the issue and help me to make the project better! 🙂