I am not able to reset the local changes made to tha anki hub deck

Before the error happened, I was…
[Replace this text.]

Error message (don't change this)
Anki 24.06.3 (d678e393)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19045

Traceback (most recent call last):

  File "aqt.taskman", line 142, in _on_closures_pending

  File "aqt.taskman", line 86, in <lambda>

  File "aqt.taskman", line 106, in wrapped_done

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\gui\browser\browser.py", line 445, in on_done
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "concurrent.futures.thread", line 58, in run

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\gui\browser\browser.py", line 451, in <lambda>
    lambda: reset_local_changes_to_notes(nids, ah_did=ah_did),

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\main\reset_local_changes.py", line 27, in reset_local_changes_to_notes
    notes_data = [

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\main\reset_local_changes.py", line 30, in <listcomp>
    if (note_data := ankihub_db.note_data(nid)) is not None

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 297, in note_data
    fields=[

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 299, in <listcomp>
    name=field_names[i],

IndexError: list index out of range

Sentry link (for developers)

Before the error happened, I was…
[Replace this text.]

Error message (don't change this)
Anki 24.06.3 (d678e393)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19045

Traceback (most recent call last):

  File "aqt.taskman", line 142, in _on_closures_pending

  File "aqt.taskman", line 86, in <lambda>

  File "aqt.taskman", line 106, in wrapped_done

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\gui\browser\browser.py", line 445, in on_done
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "concurrent.futures.thread", line 58, in run

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\gui\browser\browser.py", line 451, in <lambda>
    lambda: reset_local_changes_to_notes(nids, ah_did=ah_did),

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\main\reset_local_changes.py", line 27, in reset_local_changes_to_notes
    notes_data = [

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\main\reset_local_changes.py", line 30, in <listcomp>
    if (note_data := ankihub_db.note_data(nid)) is not None

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 297, in note_data
    fields=[

  File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 299, in <listcomp>
    name=field_names[i],

IndexError: list index out of range

Sentry link (for developers)

Before the error happened, I was…**
[Replace this text.]

Error message (don't change this)
Anki 24.06.3 (d678e393) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19045

Traceback (most recent call last):

File "aqt.taskman", line 142, in _on_closures_pending

File "aqt.taskman", line 86, in <lambda>

File "aqt.taskman", line 106, in wrapped_done

File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\gui\browser\browser.py", line 445, in on_done
future.result()

File "concurrent.futures._base", line 439, in result

File "concurrent.futures._base", line 391, in __get_result

File "concurrent.futures.thread", line 58, in run

File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\gui\browser\browser.py", line 451, in <lambda>
lambda: reset_local_changes_to_notes(nids, ah_did=ah_did),

File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\main\reset_local_changes.py", line 27, in reset_local_changes_to_notes
notes_data = [

File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\main\reset_local_changes.py", line 30, in <listcomp>
if (note_data := ankihub_db.note_data(nid)) is not None

File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 297, in note_data
fields=[

File "C:\Users\suhaib bukhari\AppData\Roaming\Anki2\addons21\1322529746\db\db.py", line 299, in <listcomp>
name=field_names[i],

IndexError: list index out of range

[Sentry link (for developers)](Sign In | Sentry

Hello,

Are you still experiencing an error when trying to reset local changes?

Yes sir it is constant , I don’t know why it is happening, I restarted as well deleted add-on and installed it again but problem is persistent

Please use AnkiHub > Help > Upload logs and data and let us know the filename shown.

ankihub_addon_logs_31a6d_1729020944.log
here it is 'sir

When possibly it will be resolved?

Please follow the steps:

  1. Close Anki
  2. Go to the C:\Users\suhaib bukhari\AppData\Roaming\AnkiHub folder. You’ll see some folders with random names. Delete/Move all such folders.
  3. Start Anki and log in again to the add-on.

I did it but problem is persistent

I went to the line 27 of main/reset local changes .py which shows (note_data := ankihub_data(nid)is not none)

Can you upload logs and data again? Please make sure to use “Upload logs and data”. The file uploaded earlier only includes the logs.

ankihub_addon_debug_info_31a6d_1729154608.zip

Previously it was showing error while clicking on reset deck changes now it shows on existing the Anki as well

Can I get any solution please I will waste my all time my review cards will be lost

@ProductTeam I can reproduce the issue with the same deck (MangoMedic NEET PG Deck). The issue stems from the add-on not ignoring deleted notes when resetting local changes, resulting in field differences in deleted notes triggering the error. Looks like a quick fix @jakub.f.

No reviews will be lost. You can work around the issue for now by unsubscribing from the “MangoMedic NEET PG Deck” deck.

1 Like


main reason I want reset is because I don’t know where from it shows more number of cards in parents deck than the cards I unsuspend in subdeck ,It looks like all sub decks are submerged on top it shows different number of cards

Probably some cards are directly in the parent deck, not in any subdeck. You can use this browser search query to locate them:

"deck:MangoMedic NEET PG Deck" -"deck:MangoMedic NEET PG Deck::*"