Import files even after newest update

HELP I HAVE AN EXAM TMRW …hey :slight_smile: so I have the newest update and tried to import a deck from a friend but it always says: “UNABLE TO READ FILE. IT PROBLY REQUIRES A NEWER VERSION OF ANKI TO IMPORT” what should I do, already disabled add-ons, still not working

Help > About – what’s your “Version” number?

And what version did your friend use to make the export?

[Or is this a cross-post from reddit? Reddit - Dive into anything]

Version: 23.12.1 (1a1d4d54)

Same for your friend?

Are either of you using add-ons? Especially the “Special Fields” add-on?
Do you get the same error when you are runnning Anki without add-ons? Troubleshooting - Anki Manual

2 Likes

yes same without the add-ons- u mean pressing shift while opening it?

The problem is most likely caused by an add-on such as Special Fields as @Danika_Dakika suggested. This particular error doesn’t appear in recent Anki versions unless an add-on is forcing Anki to use the older importing logic (Special Fields does exactly that). So I recommend double checking add-ons.

Yes. Check whether add-ons were actually disabled from Tools > Add-ons. Anki also shows a tooltip message at startup if Shift was pressed.

2 Likes

I just got this ?
and do u mean by tooltip message the sentence at the beginning something like "Skipping automatic and add-ons or something like that "

Interesting. If you open the debug console and run this code, what’s the output you get?

print(mw.pm.legacy_import_export())

If it says True, run this code then try importing the deck again:

mw.pm.set_legacy_import_export(False)
1 Like

The legacy import/export option can also be adjusted in the preferences>editing screen.

1 Like

Oh I thought that option was removed.

It was originally introduced for the sticky fields add-on, and I’m not sure it’s useful for anything else. If the add-on is adjusting the setting itself, I’d be ok with removing the setting in Anki, though it will mean users will need to use the console if they previously toggled the setting.

The add-on patches ApkgImporter.do_import():

I think the least confusing solution is to keep the option but modify Special Fields to stop overriding it (and maybe show a warning when legacy importing is not enabled).

@AnKingMed This should be a simple fix. I can send a PR if you agree. I understand the add-on became less useful after AnkiHub came out, but it’s still included with the Butler add-on and is causing some confusion: "Unable to read file" when importing a recently exported deck into Anki Windows, 23.12.1 Qt6 · Issue #37 · johnpincock/SpecialFields · GitHub

1 Like

Agreed this should be fixed. I’ve had a few similar complaints. Thanks @abdo

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.