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

Unable to connect to Habitica #71

Closed bigredjoe closed 5 years ago

bigredjoe commented 5 years ago

On Anki 2.1: After installing, and filling the progress bar, I get this error message:

Screen Shot 2019-05-27 at 1 23 36 PM

My computer is fully online and Habitica is up, it seems to be an issue with the the add-on.

eshapard commented 5 years ago

It's possible your userID / key are not correct. (they are NOT your username/password) Did the addon create the Anki Points habit?

bigredjoe commented 5 years ago

Doubled checked and I don't think that is the problem. I have used the values I used in AnkiHabitica in other integrations that call the Habitica API.

eshapard commented 5 years ago

Sorry it's not working, I don't actually have Anki 2.1, so I can't do much troubleshooting.

The addon was ported to 2.1 by another user: https://github.com/71e6fd52/AnkiHabitica I crossed my fingers and accepted his version without being able to test it out myself.

You might try deleting the Anki Points habit and letting the addon attempt to create it again.

Other than that, If you turn on the logging option (hopefully, it will work) we might get some clues as to what's going on.

Or you could try to contact 71e6fd52 by posting in one of the closed threads that he responded to.

bigredjoe commented 5 years ago

I figured out what the issue was: the add-on was swallowing an ssl cert error: https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error

My local python wasn't setup correctly. It wasn't a problem with the 2.1 code.

I was able to resolved it by using the instructions here: https://github.com/wilddom/memrise2anki-extension/issues/68#issuecomment-465673375

eshapard commented 5 years ago

Interesting... I may need to point other users to that link.

What OS are you using? The Windows versions come with their own little python engine (probably to make install simpler). I'm guessing you use a *nix-based system like me where Anki just uses your own python installation.

bigredjoe commented 5 years ago

Yes, I am using Mac OS. I think Anki uses your local python if it is a the right version. For the error I was getting, python needed a system wide way of validating the ssl cert for requests and the only way I know of doing that on Mac is to install the same version of python as Anki and run the script Install Certificates.command that comes with it.

MedAnki commented 5 years ago

Yes, I am using Mac OS. I think Anki uses your local python if it is a the right version. For the error I was getting, python needed a system wide way of validating the ssl cert for requests and the only way I know of doing that on Mac is to install the same version of python as Anki and run the script Install Certificates.command that comes with it.

I tried using your method but it didn't work for me :(

MedAnki commented 5 years ago

https://github.com/eshapard/AnkiHabitica/issues/67#issuecomment-497289663