Skip to content

Sync crashes after deck deletion #28

@genedan

Description

@genedan

Reproduction steps:

  1. Delete a deck
  2. Try to sync

I'm using Anki desktop 2.1.33. Upon sync, the dialogue box pops up:

Anki_296

Here's the traceback from the server:

Traceback (most recent call last):
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/thread.py", line 98, in _run
    ret = self.wrapper.execute(func, args, kw, return_queue)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/collection.py", line 45, in execute
    ret = func(*args, **kw)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync_app.py", line 574, in run_func
    res = handler_method(**keyword_args)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync_app.py", line 126, in applyGraves
    self.remove(chunk)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync.py", line 197, in remove
    self.col.decks.rem(oid, childrenToo=False)
  File "/home/ubuntu/lib/python3.8/site-packages/anki/decks.py", line 125, in rem
    assert cardsToo and childrenToo
AssertionError
Traceback (most recent call last):
  File "/usr/lib/python3.8/wsgiref/handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
  File "/home/ubuntu/lib/python3.8/site-packages/webob/dec.py", line 129, in __call__
    resp = self.call_func(req, *args, **kw)
  File "/home/ubuntu/lib/python3.8/site-packages/webob/dec.py", line 193, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync_app.py", line 518, in __call__
    result = self._execute_handler_method_in_thread(url, data, session)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync_app.py", line 583, in _execute_handler_method_in_thread
    result = thread.execute(run_func, kw=keyword_args)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/thread.py", line 79, in execute
    raise ret
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/thread.py", line 98, in _run
    ret = self.wrapper.execute(func, args, kw, return_queue)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/collection.py", line 45, in execute
    ret = func(*args, **kw)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync_app.py", line 574, in run_func
    res = handler_method(**keyword_args)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync_app.py", line 126, in applyGraves
    self.remove(chunk)
  File "/home/ubuntu/anki-sync-server/src/ankisyncd/sync.py", line 197, in remove
    self.col.decks.rem(oid, childrenToo=False)
  File "/home/ubuntu/lib/python3.8/site-packages/anki/decks.py", line 125, in rem
    assert cardsToo and childrenToo
AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions