-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError in _adopt_media_changes_from_zip #49
Comments
I reverted to c07fe0e and the sync succeeds. I see many errors like this:
but everything works afterward. (I would normally scrub log data, but there's nothing confidential here.) |
The successful sync on c07fe0e causes the sync on 3b8fe9e to succeed afterward:
|
I found out how to reproduce this.
Those deleted files don't exist on the server, but the Anki client doesn't know that, so it requests that they be removed. I think the issue is that the server isn't ignoring those nonexistent files and instead treats their nonexistence as a problem. Because I am able to reproduce the problem, I was able to step through and confirm that the problem was introduced in 10f4761: 10f4761 : AssertionError This issue is not urgent for me. I am running on c07fe0e ( |
This test fails on current master; might or might not be related to #49
@rsanden I just ran into this error as well. I tried to upload a collection to an AWS Lightsail instance. What's odd though is that I haven't removed extra media for a long time, and it wasn't until I uploaded my collection to a new server when the assertion error happened. The move to https is making my AnkiDroid break so I'm setting up an https capable server (another writeup on that to come). I checked my media and it seems to be uploading okay now, though. |
I am operating on 3b8fe9e
I encountered an AssertionError while attempting to push some media changes from Anki (2.1.15 and 2.1.19) on Ubuntu. As part of that process, ankisyncd is being requested to delete some media files which do not currently exist in the
collection.media
directory. This triggers the AssertionError onassert self.col.media.lastUsn() == oldUsn + processed_count
To help debug, I added some print statements to the immediately-preceding code:
The output is as follows:
The actual
collection.media
directory contains exactly the 1347 files which it would be expected to contain after a successful sync. Themedia_to_remove
(such as20180301160604_88997.mp3
) do exist under other users but not this user (yq-class-Z1
).Note that I've reproduced this every time that I try to sync, but the first time it failed there were not yet any debug print statements, so I don't have debug output from the first time it occurred.
Interestingly, I also see the same error when attempting to pull (force a download sync) from the server.
I am happy to help debug this if there's anything I can do to assist.
anki-sync-server
is a core piece of our infrastructure and I really appreciate your work on it.The text was updated successfully, but these errors were encountered: