ObsidianToAnki / Obsidian_to_Anki

Script to add flashcards from text/markdown files to Anki
GNU General Public License v3.0
1.52k stars 134 forks source link

VM109:589 Uncaught (in promise) TypeError: this.field_names is not iterable #265

Open chloeluk852 opened 3 years ago

chloeluk852 commented 3 years ago

Hi I have encountered this following issue but cannot fix it...

Uncaught (in promise) TypeError: this.field_names is not iterable
    at Note.getFields (eval at <anonymous> (app.js:1), <anonymous>:589:32)
    at AllFile.setup_frozen_fields_dict (eval at <anonymous> (app.js:1), <anonymous>:30315:151)
    at AllFile.setupScan (eval at <anonymous> (app.js:1), <anonymous>:30435:14)
    at AllFile.scanFile (eval at <anonymous> (app.js:1), <anonymous>:30539:14)
    at FileManager.initialiseFiles (eval at <anonymous> (app.js:1), <anonymous>:30665:22)
    at async MyPlugin.scanVault (eval at <anonymous> (app.js:1), <anonymous>:30958:9)
    at async HTMLDivElement.eval (eval at <anonymous> (app.js:1), <anonymous>:30995:13)
getFields @ VM109:589
setup_frozen_fields_dict @ VM109:30315
setupScan @ VM109:30435
scanFile @ VM109:30539
initialiseFiles @ VM109:30665
async function (async)
eval @ VM109:30995

Given that I have only changed the Basic to Remnote inline style: image

and I have only a test.md with flashcard formatting to (be expected to) be synced to Anki

This is how to use::Remnote single-line style
The script won't see things outside of it.
You can have::multiple notes in the same file

START
Basic
hello
back: this is back
END

Please let me know if there is anything I can do to fix it. Thank you~

dmantula commented 2 years ago

@chloe6mm I have the same issue. Latest versions of MacOS, Anki, Obsidian and all plugins.

Mux-Mastermann commented 2 years ago

same issue on Linux, Obsidian, Anki. Any fix for this?

dmantula commented 2 years ago

same issue on Linux, Obsidian, Anki. Any fix for this?

What did I do to fix the issue: (1) changed my note types and fields so that they don't have any special characters other than dashes. (2) Uninstalled and installed the plugin from scratch, synchronized everything again. And it worked!

lily8186 commented 1 year ago

win10遇到了同样的问题,还没解决

JackMatanky commented 1 year ago

I am also having this issue and dmantula's solution did not work for me. Has anyone found another way to bypass this issue?