Is it only me? Anki giving corrupt collection error


I’ve been getting this message since tomorrow (or maybe today). However, even if it says the collection is corrupt, it sync whole collection as I can verify it by syncing to my AnkiDroid. So I guess collection isn’t corrupt! Yes, I switched Anki versions from .30 to .26 one or two days back but I guess it’s not the problem since it was working well even after downgrading. After this error, I again tried other versions, including .30 (again) to see whether the problem persists. Unfortunately, every version is giving same error, even standard version. And yeah, this error only pops up while last syncing or when I close the Anki. It doesn’t pop up when I sync randomly while using it.

This can be caused by some file sync or backup software that may be reading or modifying your collection.

@ANH25 I don’t think I have any such software. However, I manually take collection backup regularly, but I have been doing this for months and don’t think it’s the problem!

You can reproduce the problem when you disable all add-ons and restart Anki? Is your Anki data stored on your C drive (the default), or somewhere else?

The following error is popping up randomly sometimes! And btw, I’m the same guy who posted this.You think any connnection between the both or they are separate issues altogether? @dae

An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you’ve discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.30 (06a69c25) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-08-18 12:37:27

Caught exception:
Traceback (most recent call last):
File “aqt\”, line 298, in
File “aqt\”, line 269, in _answerCard
File “aqt\”, line 110, in nextCard
File “anki\”, line 64, in getCard
File “anki\”, line 693, in log
PermissionError: [Errno 13] Permission denied

It’s possible they are related.

You mean by starting Anki by holding shift key, right? I did try this right now but it’s still happening.

Of course it’s in C drive.

Just a few more things. I had installed new Windows 10 (latest version). So just that I don’t have to install all the addons in the new Windows 10, I went to windows.old folder in C drive (it’s basically all old files of your old Win10) and copied addon folder and pasted it in new profile in the new Win10. Could that create any problem? Btw as i said, I tried starting Anki by pressing shift key but the corruption problem was still there. So I don’t think it should be a problem. Also, everything was working fine for few days after I had installed new Win10 and copied addons from windows.old folder.

I guess I should delete my Anki folder altogether and re-download the collection of my profile on new Win10 and installing addons manually rather than copying them from Windows.old folder. Do you recommend that?

It shouldn’t matter, as you’re testing with add-ons disabled.

You don’t have any third party antivirus/anti-malware/etc software running on your machine? Is there some sort of pattern to when the issues occur?

Yes, I have Kaspersky. I tried to pause it and then see if problem still there. Unfortunately, it’s still there!!!

Talking about pattern, I don’t think I can see any specific pattern for this problem. But yes, yestardy or day before yestardy ( can’t remember), Anki randomly started giving error messages for one or two addons, including Image occlusion. I deleted the first addon which gave error as it wasn’t important anyways. But agiain same sort of error came for image occlusion, but I didn’t delete it as it’s important. I think the other post of mine which you merged here is surely connected with this problem.

I think i should delete Anki + its collection and try Anki 2.1.26 alternative just to see if problem still there. I’ll let you know in few hours.

Unfortunately “pause” may not be enough - an unrelated issue, but the same comments about AV programs apply:

Hi, @dae I just uninstalled Anki and delete Anki collection folder. Then I installed Anki 2.1.26 alternative. Surprisingly, the problem of corrupt media is gone!!! I don’t have any addon as it’s a fresh insallation altogether. So i guess it was in fact some addon problem? god knows.

I want to upgrade Anki to 2.1.30 but I suspect it might just come back! What do you recommend? Should I keep using 2.1.26 alternative till next Anki update?

Btw I had received this message when i first insalled the fresh Anki .26 alternative copy. But it didn’t come back ever.

Maybe it’ll be all for nothing, but if it happens again, i.e.

File “anki\”, line 693, in log
PermissionError: [Errno 13] Permission denied

and you feel a bit adventurous, download Process Explorer and use Find > Find Handle or DLL… (Ctrl+F) to search for collection.log.

Thanks!!! It’s really helpful!

This is not a widespread issues as far as I’m aware. You can always downgrade again, so I suggest you update and see if it comes back.

I upgrade to 2.1.30 standard and the problem isn’t there anymore. Moreover, I’ve all the previous addons.

Anki is giving this error sometimes when i search for something. However, this error only comes when there’s nothing in the search result. Also, this doesn’t happen everytime there’s no search result, just sometimes.

I’d expect that to only arise from certain search strings. Can you give me an example search that causes that error? I presume this is happening with 2.1.30, and happens with add-ons disabled?

Sorry for being late as this error is rare, but still exist so it took time for me to catch it. So, today it again appeared. As you can see in the search bar the I searched for “Basic exchange and” and this is when the error came, but I again searched w “Basic exchange” then the error didn’t appear and located the correct card. This error is, as I said, rare maybe because I don’t use search bar very often. Just to not confuse you, the previous screenshot of the same error belong to different phrase not “Basic exchange and”. Also, the last screenshot of this error was from 2.1.30 and today’s screenshot belongs to 2.0.31. And no, I haven’t yet tried disabling addon and check the error as I didn’t know which search generated this error, but now I know phrase which generates this error, so I can try disabling addon and se if it’s still there. But you think addons could create this problem? I just have 7-8 addons. And btw, it’s a minor issue that don’t make any difference and just wanted to let you know about this just in case someone else report this or for Anki’s future developments. I hope you don’t get bothered by reporting of this minor issues.

‘and’ is a special word in Anki, and it expects something to come before and after it. The error message should be improved, but the root cause is your search.

1 Like