TheDabblingDuck / ankimote

Ankimote is an addon that adds remote control functionality to Anki flashcards
MIT License
25 stars 4 forks source link

Attempting to select a deck via the remote locks Anki #13

Closed newageoflight closed 3 years ago

newageoflight commented 3 years ago

Issue: attempting to select a deck via Ankimote while at the home deck screen leads to an error of the following description. This also occurs when trying to sync my collection thereafter.

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, repeat 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-ons section of our support site. 
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-01-14 23:36:36

Caught exception:
Traceback (most recent call last):
  File "aqt\taskman.py", line 87, in _on_closures_pending
  File "aqt\taskman.py", line 59, in <lambda>
  File "aqt\taskman.py", line 76, in wrapped_done
  File "aqt\sync.py", line 114, in on_future_done
  File "aqt\main.py", line 912, in on_collection_sync_finished
  File "aqt\main.py", line 699, in reset
  File "aqt\main.py", line 661, in moveToState
  File "aqt\main.py", line 683, in _reviewState
  File "aqt\reviewer.py", line 65, in show
  File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-28>", line 2, in nextCard
  File "anki\hooks.py", line 638, in decorator_wrapper
  File "anki\hooks.py", line 629, in repl
  File "aqt\reviewer.py", line 84, in nextCard
  File "anki\collection.py", line 534, in timeboxReached
AttributeError: 'Collection' object has no attribute '_startTime'

To replicate: attempt to choose a deck via "Switch Deck" submenu in the Ankimote Client, while Anki is in the main menu. Thereafter any action appears to be blocked.

TheDabblingDuck commented 3 years ago

Hmm, I'm not having that issue.

Looks like that error is related to syncing. Can you open anki fresh and post the first error that occurs when you try switching decks when in the main menu?

newageoflight commented 3 years ago

Sure. The ultimate error message (the AttributeError) was the same for both though. From a cursory glance, it would appear that the issue relates to my use of the timeboxing feature.

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, repeat 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-ons section of our support site. 
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-01-14 23:36:36

Caught exception:
Traceback (most recent call last):
  File "C:\Users\camin\AppData\Roaming\Anki2\addons21\149004221\__init__.py", line 190, in handleMessage
    mw.moveToState("review")
  File "aqt\main.py", line 661, in moveToState
  File "aqt\main.py", line 683, in _reviewState
  File "aqt\reviewer.py", line 65, in show
  File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-28>", line 2, in nextCard
  File "anki\hooks.py", line 638, in decorator_wrapper
  File "anki\hooks.py", line 629, in repl
  File "aqt\reviewer.py", line 84, in nextCard
  File "anki\collection.py", line 534, in timeboxReached
AttributeError: 'Collection' object has no attribute '_startTime'
TheDabblingDuck commented 3 years ago

Hmm... Yeah but error message is different in that it shows that the error is in line 190 of my addon.

Do you happen to have emojis or any non standard characters your deck names?

What happens when you try to use the deck switcher when you're already in the review screen, just in a different deck?

newageoflight commented 3 years ago

No, my deck name is all alphanumeric characters.

Switching in the way you described doesn't produce any issues.

TheDabblingDuck commented 3 years ago

Closing because I haven't been able to reproduce this behavior