Closed GradyMoran closed 6 years ago
See https://github.com/GradyMoran/pychal/blob/8c0616dec6d684ffbd7541b01ce11cf234966683/challonge/api.py#L114 for the easiest way to fix this I could think of. That doesn't list every field which is guaranteed to be a string. I can open a pull request if you want.
@GradyMoran Thank you for reporting this issue. A PR will be nice
This issue is fixed. Thanks for your PR. If you are using pychal in your module please use 1.8.1
https://github.com/ZEDGR/pychal/blob/ebefcc8fc05798ce71f1199eb2481a4b99c84608/challonge/api.py#L121
The value of key 'display_name' in the dictionary returned from participants.index() is a float when the tournament participant's name passes float(v) without throwing ValueError. Thus in the returned dictionary every participant's name is of type str except those that can be interpreted as numbers, which are of type float.
FWIW, pychallonge does not have this issue.