KartikTalwar / Duolingo

Unofficial Duolingo API Written in Python
MIT License
825 stars 128 forks source link

issue with get_known_words #47

Closed cmd16 closed 4 years ago

cmd16 commented 7 years ago

So I was trying to use duolingo.py, but suddenly get_known_words() stopped working for some reason. It was working earlier, and then suddenly python started throwing me a KeyError. I can't recall changing anything. I created a Duolingo object called lingo, passing in the username and password. Then was the problem line:

print(lingo.get_known_words('fr'))

Here is the error message, which by the way appeared with every language I tried (i.e., several different languages I am learning):

Traceback (most recent call last): File "/Users/cat/PycharmProjects/duolingo/duolingo_proj.py", line 6, in <module> print(lingo.get_known_words('fr')) File "/anaconda/lib/python3.5/duolingo.py", line 341, in get_known_words for topic in self.user_data.language_data[lang]['skills']: KeyError: 'fr'

Am I typing something wrong, or did the function just stop working?

Edit: noticed that on the website itself I was having trouble seeing wordlists on some languages, incidentally the same ones I tried when noticing the python error. get_known_words() worked just fine with German.

cmd16 commented 7 years ago

Okay so it seems to have just been a brief issue that resolved itself; all languages work now. Idk what that was, but closing the issue now since it seems to have been resolved? Weird.

cmd16 commented 7 years ago

Never mind it's still not working.

cmd16 commented 7 years ago

Ok I think I know what the issue is. It depends on what language I currently have selected online. Currently it only works if online I am on the page for the language I am trying to get the words for. For example:

screen shot 2017-08-11 at 9 23 57 pm

When this is what my duolingo website looks like, I can only get the wordlist for Italian.

SpangleLabs commented 4 years ago

I think this is working now? Closing ticket