Closed piti166 closed 8 years ago
You have to do it like this:
mytour = challonge.tournaments.show("mytournament")
part1 = challonge.participants.create(mytour['id'], "participant_name")
I still get the Error, my concrete code is:
tournament = challonge.tournaments.create("name" + str(nr), url, "double elimination")
for name in participants:
print(url, name)
challonge.participants.create(tournament["id"],name)
participants is a list with given names in String form.
Which python version are you using ?
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
I have just tested for Windows also your code snippet and no error appeared everything worked fine.
I suggest upgrading your python installation to Python 2.7.11 which is the latest version of 2.7 branch and try again.
I installed pychallonge from pip and my Python version is: 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)]
I updatet Python an reinstalled challonge through pip and now it works, Thanks :)
The participant creation seems broken, I can use everything else in the api except the challonge.participants.create() method. I call it with the correct url and a simple name but get the following error:
"ChallongeException: Participant parameters are required"
Removing or adding parameters results in the error:
"TypeError: create() takes exactly 2 arguments (1 given)"