Skip to content

Instantly share code, notes, and snippets.

What would you like to do?


During the MorphMan recalc, if you encounter the ModuleNotFoundError error, that probably means that Anki is trying to access a database that was generated by the older version of MorphMan, the one that's for 2.0. In such case, there are two potential courses of action that you can take. One that you should take depends on how your MorphMan database was initially made:

  1. The database was generated purely from your Anki collection, with no imports to the external.db or priority.db. If you do have a priority.db, but it's simply a pre-made list, this option is also applicable for you.
  2. The database was generated from your Anki collection ALONGSIDE some custom imports into your external.db (from books, etc.).

Database was generated purely from your Anki colletion

In this case, go to your dbs folder via the following path: %APPDATA%\Anki2\<profile>\dbs (make sure to replace part with the name of the Anki profile that you're doing this for). After you're there, simply delete everything that ends with .db in that folder. Finally, recalc the database in Anki itself. If you had a priority.db, you can re-import the pre-made list.

The database was generated from your Anki collection ALONGSIDE some custom imports into your known.db

In this case, you will have to migrate the external.db (and maybe priority.db if it was customly-made). On Anki 2.0, via the MorphMan database manager, select the database that you want to migrate via Browse for DB A button. Then, press on the A button. All of the known morphemes will now appear in the big text area to the left. Click on it, use the shortcut combination CTRL+A, then copy everything. Then, make a new text file and paste everything in it. I recommend using Notepad++, as it supports UTF8 out of the box, unlike the generic text editor that comes pre-packaged with the Windows installation. After you have the text file, on Anki 2.1 open the database manager, press Extract morphemes from file button and choose the text file that you've just created. Then, click the Save results to db button, name it appropriately (so if you were migrating external.db, then name it the same way), then put it into your dbs folder. Repeat with all the databases that you need migrating.

Copy link

t-mak commented Sep 1, 2019

Hey, thanks for the tutorial.
I think there is a mistake in it though. Saving an old db as known.db only results in it being overwritten on the next recalc.
I changed from Anki 2.0 to Anki 2.1 and was trying to make Anki 2.1 recognize my old database and see all the cards I already learned in Anki 2.0.

What worked for me was following the steps as you've described, but calling the database differently.
So instead of calling it known.db I called it external.db and put it in %APPDATA%\Anki2<profile>\dbs (or respective for Linux).
Now it works :)

Copy link

InfiniteRain commented Sep 3, 2019

Thank you for reporting this! I have now fixed the instructions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment