`graves['cards']`: TypeError: 'NoneType' object is not subscriptable
Closed this issue · 2 comments
constructor-s commented
I just set up a new server and so far it seems to work well except whenever I sync now it complains:
Traceback (most recent call last):
File "C:\Users\USERNAME\miniforge3\envs\anki\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "C:\Users\USERNAME\miniforge3\envs\anki\lib\site-packages\webob\dec.py", line 129, in __call__
resp = self.call_func(req, *args, **kw)
File "C:\Users\USERNAME\miniforge3\envs\anki\lib\site-packages\webob\dec.py", line 193, in call_func
return self.func(req, *args, **kwargs)
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\sync_app.py", line 523, in __call__
result = self._execute_handler_method_in_thread(url, data, session)
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\sync_app.py", line 588, in _execute_handler_method_in_thread
result = thread.execute(run_func, kw=keyword_args)
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\thread.py", line 79, in execute
raise ret
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\thread.py", line 98, in _run
ret = self.wrapper.execute(func, args, kw, return_queue)
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\collection.py", line 45, in execute
ret = func(*args, **kw)
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\sync_app.py", line 579, in run_func
res = handler_method(**keyword_args)
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\sync_app.py", line 124, in start
self.remove(graves)
File "E:\Users\USERNAME\GitHub\anki-sync-server\src\ankisyncd\sync.py", line 221, in remove
self.col.remove_cards_and_orphaned_notes(graves['cards'])
TypeError: 'NoneType' object is not subscriptable
It seems to me that graves
is None
.
The Anki client error message box says: AnkiWeb encountered a problem. Please try again in a few minutes
Using Anki Windows 2.1.33 (b2b3275f)
constructor-s commented
Thanks for pointing this out and sorry for the duplicate. Will update once the pull request is merged.