ObsidianToAnki / Obsidian_to_Anki

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

Trying to Sync Causing Freeze and Crash #448

Open not-alaris opened 1 year ago

not-alaris commented 1 year ago

Trying to sync with anki causes the Obsidian Helper (Renderer) to use 99-100% of the CPU, and Obsidian freezes, and eventually crashes. I don't have any large complicated flashcards, with images or anything. I am using Neuracache, and have 3 decks, all with only text. Anki is set up properly, and the sync has been working in the past, until today. I have changed nothing with any settings.

I've tried uninstalling and reinstalling both Anki and the plugin. I've also reset my decks, and it still happens. (macOS 13.2.1, Obsidian v1.4.13)

MaxeThis commented 1 year ago

I am installing for my first time and I am having a similar issue. My anki itself freezes during the sync and my debug console on obsidian is stopped on "tags need to be replaced".

(macOS Ventura 13.4, Obsidian 1.4.13, Anki 2.1.66 QT5)

lsolesen commented 11 months ago

Do you have Excalidraw-files in your vault? #439

cameronj86 commented 10 months ago

Experiencing the same issue today. Here are my (un)educated guesses based on tracking where the console would freeze:

  1. It is erroring out on larger files: All the files that caused my crashes were for online courses w/ +20 pages before exported from Google Docs
  2. It is erroring out on files that used the importer: I used the built-in importer and imported as html.
  3. It is erroring out on files that have lots of RegEx-relevant symbols: The docs were courses on Web Programming/JavaScript and had a lot of characters that could trigger RegEx to slow down and check for flashcards.

It could be all/none of those issues, but once I deleted the two files that fit all of any/all of those criteria, the process ran as normal.

Alternatively, open the log (Ctrl + Shift + I) and then trigger the plugin. You should get a constant flow of files being scanned and printed to the logs. When it hangs on a doc for an extended period of time, that's likely what's causing the log jam ;)