Can't export Anki deck

I’m trying to export a deck I just created (including media and scheduling information) and I keep getting this error message. The file gets created in my downloads folder but it is 0 bytes in size. Can someone help?

I did try Tools > Check Database - this did not fix the problem. Of note, I did recently download the newest version of Anki and I’m wondering if that could be the problem. I’ve never had an issue exporting decks in the past.

Here is the copied and pasted information from the error message:

Anki 2.1.46 (94913ec2) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=False sv=2
Add-ons, last update check: 2021-08-11 12:55:40

Caught exception:
Traceback (most recent call last):
File “aqt/taskman.py”, line 101, in _on_closures_pending
File “aqt/taskman.py”, line 71, in
File “aqt/exporting.py”, line 173, in on_done
File “concurrent/futures/_base.py”, line 432, in result
File “concurrent/futures/_base.py”, line 388, in __get_result
File “concurrent/futures/thread.py”, line 57, in run
File “aqt/exporting.py”, line 167, in do_export
File “anki/exporting.py”, line 342, in exportInto
File “anki/exporting.py”, line 350, in doExport
File “anki/exporting.py”, line 253, in exportInto
File “anki/models.py”, line 539, in update
File “anki/_backend/generated.py”, line 450, in add_or_update_notetype
File “anki/_backend/init.py”, line 131, in _run_command
anki.errors.TemplateError: Card template ⁨10⁩ in notetype ‘⁨10 questions⁩’ has a problem.
The front side is identical to card template ⁨9⁩.

You’ll need to adjust or remove the duplicate template by clicking on Cards… in the editing screen.

1 Like

Okay so I had the same issue and couldn’t solve it without updating. The log revealed to me quickly that it was a Card type (a.k.a a template) that I had added, where the front side was identical to the back. This was deliberate, so I added a html comment to both to distinguish them.

If you haven’t added too many note types / card type templates yourself, just go the ones you have edited and scan the names for lines that have all the same variables.