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

Crashing at anki launch #8

Closed MeliFlaquer closed 8 years ago

MeliFlaquer commented 9 years ago

Traceback (most recent call last): File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.addons", line 41, in loadAddons File "c:\pyi\iu.py", line 436, in importHook File "c:\pyi\iu.py", line 521, in doimport File "C:\Users\DELL\Documents\Anki\addons\Anki_HRPG.py", line 36, in api_token = config['token'] KeyError: 'token'

eshapard commented 9 years ago

So this happens when you start Anki, or does it happen when you sync or open a deck or something?

Had you gone through the setup procedure first? It seems to be complaining about not finding your api_token.

Do you have a .habitrpg.conf file in your Anki addons directory? If so, try deleting it and then start Anki.

On Thu, Aug 27, 2015 at 10:50 AM, meli2905 notifications@github.com wrote:

Traceback (most recent call last): File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/aqt.addons", line 41, in loadAddons File "c:\pyi\iu.py", line 436, in importHook File "c:\pyi\iu.py", line 521, in doimport File "C:\Users\DELL\Documents\Anki\addons\Anki_HRPG.py", line 36, in api_token = config['token'] KeyError: 'token'

— Reply to this email directly or view it on GitHub https://github.com/eshapard/AnkiHRPG/issues/8.

MeliFlaquer commented 9 years ago

It happens when I start anki. I had just set it up when it chrashed... several times. I deleted the file and it still crashed.

I give up, deleted the add on :(

Sorry for responding so late. Very busy with work on this month.

eshapard commented 9 years ago

Hmm... sorry about that. It still sounds like it was unhappy with a config file somehow, but I guess we'll never know.

On Fri, Sep 25, 2015 at 4:01 PM, Melissa Flaquer notifications@github.com wrote:

It happens when I start anki. I had just set it up when it chrashed... several times. I deleted the file and it still crashed.

I give up, deleted the add on :(

Sorry for responding so late. Very busy with work on this month.

— Reply to this email directly or view it on GitHub https://github.com/eshapard/AnkiHRPG/issues/8#issuecomment-143372209.

ThrashAbaddon commented 9 years ago

I have that problem, the same traceback

eshapard commented 9 years ago

I'm unable to replicate this.

Does this happen immediately after installing the addon, or after you went to Tools > Setup HabitRPG

What version of Anki is this? What platform are you running this on? (windows 7, 8, 10, etc.)

Have you tried deleting the .habitrpg.conf file from your Anki addons dir?

Would you mind posting the contents of the .habitrpg.conf file? You can delete all but the first few digits of your user ID and API key. I want to check the file to see if it has the "token" set. That's what the error message is complaining about.

On Mon, Nov 9, 2015 at 12:46 PM, ThrashAbaddon notifications@github.com wrote:

I have that problem, the same traceback

— Reply to this email directly or view it on GitHub https://github.com/eshapard/AnkiHRPG/issues/8#issuecomment-155188049.

ThrashAbaddon commented 9 years ago

Deleting .habitrpg.conf file from Anki addons dir solved the problem. Before that I couldn't enter ID or API because there was no Setup HabitRPG button under Tools tab.

Thank you eshapard :)

spottygurgle commented 8 years ago

I get this message when I open Anki on my Macbook:

Traceback (most recent call last): File "aqt/addons.pyc", line 41, in loadAddons File "/Users/me/Documents/Anki/addons/Anki_HRPG.py", line 36, in KeyError: 'token'

I don't know if I did something wrong? I'm really dumb with computer stuff. :(

eshapard commented 8 years ago

This looks like the same error as the original poster and ThrashAbaddon, spottygurgle.

Have you tried deleting the .habitrpg.conf file from your Anki addons dir? That should be /Users/me/Documents/Anki/addons/.habitrpg.conf

spottygurgle commented 8 years ago

Hi! Thanks for responding! There is only a file called Anki_HRPG.py there.

spottygurgle commented 8 years ago

Oh wait I figured it out lol! So embarrassing... Thanks! :)