How to display stacktrace and error messages?

Like the title of my question suggests I would like to display the entire stacktrace of any errors that occur when using Anki on desktop. Saw a couple of other users here already posting these error logs. Unfortunately I’m not sure how to display these.

Thanks in advance!

Edit: The OS I am currently using is: macOS Big Sur Version: 11.6.3 (20G415)

Usually, what the users post comes from a pop-up that appears when such errors occur. If you don’t have these, there is probably nothing to provide when reporting an error.

Besides that, it may sometimes be useful to launch Anki in a terminal, which will show whatever the program may print (including, sometimes, errors). It’s usually not necessary to do so unless someone asks you to.

Also, that may depend how which errors you are looking for. If you’re looking for error reports by add-ons, these may come in any form (it actually depends on the add-on). You may also be looking for a way to debug you own add-ons or stuff like that, but in that case I can’t help you much.


I try to import a selfmade .apkg-file. Unfortunately the import doesn’t succeed and I’d like to know why exactly that is. How can Anki be ran from the terminal?

Open a terminal and simply type anki (and press Enter).
Btw, don’t know how “public” is the structure of a .apkg file (in the sense, how much it was intended to be built by software other than Anki itself), which may explain why there isn’t much of an error reporting: maybe Anki doesn’t expect a non-valid .apkg file. Instead, you could try generating a CSV file, which is a format which is both very easy to use and for which Anki has a pretty good support (in the sense that you can set many options, and Anki will provide better error messages if it fails to understand it).
So maybe producing a CSV file for now may be easier to debug, as it’s also easier to simply edit it by hand (whereas an .apkg file is an archive).


Unfortunately that doesn’t work. I suppose because it’s not on PATH yet? Executing a Anki Mac called file starts Anki though. Unfortunately no error is displayed when an import fails. Importing a CSV is not an option right now as I am developing an application that generates APKG files in the end.

Maybe /Applications/Anki then? I’m sorry I’ve never used MacOS so if that doesn’t work I’m out of ideas :grimacing:

Try /Applications/


Thanks for the suggestion. I’m currently browsing the docs in order to find something helpful. Unfortunately I haven’t found anything yet that logs the error.

You could try the new importer in 2.1.52+. It may or may not give a more helpful error.


This was a great suggestion! The error messages in the newer version seem indeed to be pretty helpful compared to the older ones. :+1:t3:

1 Like