hgiesel / anki_straight_reward

Escape Ease Hell!
https://ankiweb.net/shared/info/957961234
22 stars 4 forks source link

Getting error like this #16

Closed kinkeymonkey161 closed 4 years ago

kinkeymonkey161 commented 4 years ago

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site. Debug info: Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-07-07 07:50:55

Traceback (most recent call last): File "aqt\main.py", line 496, in loadCollection File "aqt\gui_hooks.py", line 718, in call File "C:\Users\Gun\AppData\Roaming\Anki2\addons21\957961234\src\lib\sync_hook.py", line 102, in after_sync result = check_cids(col, reviewed_cids) File "C:\Users\Gun\AppData\Roaming\Anki2\addons21\957961234\src\lib\sync_hook.py", line 66, in check_cids card = Card(col, revcid) File "lib\site-packages\anki\cards.py", line 44, in init File "lib\site-packages\anki\cards.py", line 51, in load AssertionError

hgiesel commented 4 years ago

Hm, these seems to imply that you reviewed cards which do not exist in the collection you try to sync with. The naive solution is very simple, but I wonder what causes this behavior.

Do you happen to create cards on mobile? Either AnkiMobile on iOS or AnkiDroid?

kinkeymonkey161 commented 4 years ago

I don't create cards on mobile.I did it in my other profile in Windows Anki and also I have never synced that profile with Anki.

hgiesel commented 4 years ago

So you have multiple instances of desktop Anki? I had some concerns over this before. My recommendation would be to only Straight Reward installed on one of these Anki instances.

However this here is a different issue altogether, I'll see that I can find some time today to fix it. Thanks for the bug report!

kinkeymonkey161 commented 4 years ago

Yea, I have multiple profiles in Anki for different experiments and I have got the same error now too.

And how can I install a add on specific to one profile.If I install in one,it gets installed in all the profiles :(

hgiesel commented 4 years ago

There's currently no way to do this. I will see that I implement this in the next version.

hgiesel commented 4 years ago

You can now update to the newest version, if you restart Anki. This one should fix your issue: The exception you saw is now captured, also there's a new way to disable the sync hook on a specific profile here:

settings_image

kinkeymonkey161 commented 4 years ago

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site. Debug info: Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-07-10 08:45:48

Traceback (most recent call last): File "aqt\main.py", line 496, in loadCollection File "aqt\gui_hooks.py", line 718, in call File "C:\Users\Gun\AppData\Roaming\Anki2\addons21\957961234\src\lib\sync_hook.py", line 109, in after_sync result = check_cids(col, reviewed_cids) File "C:\Users\Gun\AppData\Roaming\Anki2\addons21\957961234\src\lib\sync_hook.py", line 75, in check_cids did = card.odid or card.did UnboundLocalError: local variable 'card' referenced before assignment

Now I'm getting this error

hgiesel commented 4 years ago

I updated it again.

kinkeymonkey161 commented 4 years ago

Thanks man ! It's fine now