-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report_winner function doesn't work inside a group stage #10
Comments
Thanks for reporting the issue! |
@3rdCore did you create the group stage via API/achallonge? |
I created the tournament using the web interface and I then call the tournament using its token. my_user = await challonge.get_user(my_username, my_api_key)
my_tournament_id = 'ycpl6a79'
my_tournament = await my_user.get_tournament(my_tournament_id)
print(my_tournament.name, my_tournament.full_challonge_url)
#if not (my_tournament.state =='pending'):
# print("tournament reseted")
# await my_tournament.reset()
#print("Beginning of the tournament !")
await my_tournament.start()
matches = await my_tournament.get_matches()
players = await my_tournament.get_participants()
player_index = {players[i].id:i for i in range(0,len(players))}
for match in matches:
player1 = await my_tournament.get_participant(match.player1_id)
player2 = await my_tournament.get_participant(match.player2_id)
#print("players id : ", player1.id, " ", player2.id)
#player1.id = player1. [0]
#player2.id = player2.group_player_ids[0]
#print("players id : ", player1, " ", player2.id)
winner, score = get_winner_and_score(player1, player2)
await match.report_winner(winner,score) |
ok, so with |
That's right. I set up the tournament ( number of player, tournament tree.. ) online, does it come from this ? First of all, the function Should I try to totally setup a tournament through the API ? Have you understand the difference between Thanks for your help. |
do you guys figured out what could be the problem ? |
No, sorry, I haven't looked into it yet. |
I've managed to update the scores using the function This is obviously not a solution but could help someone else stuck in the same situation as me. |
report_winner
function seems not to work correctly while being used for matches inside a group stage. The associatedgroup_player_ids
for a player inside a group is not understanted by the functionreport_winner(..)
. This function expects a player with theid
attribute equals togroup_player_ids
but get a player with his original id (outsite group stage) and crash.example, with 2 objects
player
andmatch
:The text was updated successfully, but these errors were encountered: