Duolingo icon indicating copy to clipboard operation
Duolingo copied to clipboard

Leaderboad Doesn't Work

Open allenweiss opened this issue 2 years ago • 4 comments

I'm using this command for the leaderboard - just as it is in the description

print(lingo.get_leaderboard('week'))

but I keep getting this error

TypeError: get_leaderboard() missing 1 required positional argument: 'before'

According to the docs, you don't any other parameter - but it appears you do.

allenweiss avatar Aug 13 '22 20:08 allenweiss

Documentation says it's optional, but the implementation requires before argument, so you do have to provide it.

You can try something like this:

from datetime import datetime

print(lingo.get_leaderboard('week', datetime.now().strftime("%Y.%m.%d %H:%M:%S")))

However apparently there is another issue related to #117, which results in the following error:

KeyError: 'points_ranking_data'

igorskh avatar Aug 13 '22 21:08 igorskh

right..I tried that and got the points_ranking_data error as well

allenweiss avatar Aug 13 '22 22:08 allenweiss

I'm trying to fix the issue. I will open a pull request soon

Bapt5 avatar Aug 14 '22 08:08 Bapt5

Getting get_leaderboard() to be functional would be great. Do you still plan to fix it, @Bapt5 ?

B-G-T avatar Jan 28 '23 13:01 B-G-T