Image Occlusion Enhanced "An image is missing"

Hi, looks like image file names are not marching the ones referenced by the cards after editing the cards. I’ll show an easy-to-reproduce case. I hope it’s self-explanatory:

Step 1: create an Image Occlusion Enhanced card in the Desktop app with the next image and sync:


Step 2: In the iphone, sync, review the card and sync again. Everything is ok, as in the next images:

Step3: Back to the desktop app, sync, edit the image, create a new card as in the following image and sync again:

Step 4: Back to the iphone, sync, review and get these errors:

First card:

Second card:

And in the check media option:

In the desktop app everything works fine after editing and adding the card.

Forcing changes in one direction doesn’t fix the issue (uploading from desktop and downloading from iphone).

Looks like the phone app stores the image with the original name (test1.jpg) instead of the long name the desktop app gives the files (a912afe129c4…2-Q.svg)

Desktop app version is 2.1.54 PyQt6
Phone app version is 2.0.87

Thanks in advance

Please repeat the test, but confirm that the computer version shows “media sync complete” after you make the change, and then confirm AnkiMobile does too: Media files may take time to sync - Frequently Asked Questions

Confirmed. Media sync is complete. Same result.

Thanks @ivan.

@glutanimate this is caused by IOE using a combination of add_file() and writing files directly into the media folder - the latter are not getting picked up due to the dir mtime being the same timestamp. I’ll trial a change that will avoid this in .55, but you may still want to address it for previous Anki releases.


Thanks for the heads-up! The add-on should account for that normally (by using a fairly silly approach - writing a dummy file to update the mtime). But that must have broken with 1.4.0. Added to the issue tracker here and will look into it.

Cheers for the .55 change as well :slight_smile:

1 Like

The issue here is a bit different - the repro steps above cause new files to be added as well, which would normally trigger a scan for changes, but that doesn’t happen as the directory timestamp was just updated by a call to add_file. As the resolution is to the second, the subsequent direct writes don’t cause an observable difference in the timestamp.

1 Like