eshapard / AnkiHabitica

Anki 2.0/2.1 add-on for use with HabitRPG. Automatically scores habits when you reach the end of your Anki timebox and when you review all cards in a deck.
GNU General Public License v3.0
197 stars 31 forks source link

Errors. Can't connect to Habitica #74

Closed louisadela closed 5 years ago

louisadela commented 5 years ago

Anki 2.1.13 (3ba55990) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3 Platform: Mac 10.14.5 Flags: frz=True ao=True sv=1 相关扩展:Anki Habitica formerly Anki HRPG

Caught exception: File "aqt/progress.py", line 72, in handler File "aqt/main.py", line 136, in setupProfile File "aqt/main.py", line 276, in loadProfile File "anki/hooks.py", line 29, in runHook File "/Users/adela/Library/Application Support/Anki2/addons21/954979168/init.py", line 737, in grab_profile if ah.settings.check_db_on_profile_load and ah.settings.configured and ah.habitica.grab_scorecounter('Anki Points') and compare_score_to_db(): File "/Users/adela/Library/Application Support/Anki2/addons21/954979168/habitica_class.py", line 388, in grab_scorecounter if self.missing[habit]: <class 'KeyError'>: 'Anki Points'

I've read #71 and #67 and tried them out, not working for me. I switched from Anki 2.0 to 2.1, after I set up the profile and restarted Anki 2.1, it keeps popping up this window.

71e6fd52 commented 5 years ago

change /Users/adela/Library/Application Support/Anki2/addons21/954979168/habitica_class.py line 388

            if self.missing[habit]:

to

            elif self.missing[habit]:

and enable debug in __init__.py settings.

What's the error now.

71e6fd52 commented 5 years ago

Does the latest version fix it?

louisadela commented 5 years ago

Does the latest version fix it?

Yes, it fixes the problem! It's working smoothly now, thanks a lot : )