opened
hingston
username_0
Running
```
import random

import cassiopeia as cass

cass.set_riot_api_key("YOUR_KEY")  # This overrides the value set in your configuration/settings.
cass.set_default_region("NA")

summoner = cass.get_summoner(name="Kalturi")
print("{name} is a level {level} summoner on the {region} server.".format(name=summoner.name,
                                                                          level=summoner.level,
                                                                          region=summoner.region))

champions = cass.get_champions()
random_champion = random.choice(champions)
print("He enjoys playing champions such as {name}.".format(name=random_champion.name))

challenger_league = cass.get_challenger_league(queue=cass.Queue.ranked_solo_fives)
best_na = challenger_league[0].summoner
print("He's not as good as {name} at League, but probably a better python programmer!".format(name=best_na.name))
```

Produces

```
Making call: https://na1.api.riotgames.com/lol/summoner/v4/summoners/by-name/Kalturi
Kalturi is a level 120 summoner on the Region.north_america server.
Making call: https://ddragon.leagueoflegends.com/realms/na.json
Making call: https://ddragon.leagueoflegends.com/cdn/9.2.1/data/en_US/championFull.json
He enjoys playing champions such as Darius.
Making call: https://na1.api.riotgames.com/lol/league/v4/challengerleagues/by-queue/RANKED_SOLO_5x5
Traceback (most recent call last):
  File "C:/Users/username_0/PycharmProjects/test/test.py", line 18, in <module>
    best_na = challenger_league[0].summoner
  File "C:\Users\username_0\AppData\Local\Programs\Python\Python37\lib\site-packages\cassiopeia\core\league.py", line 364, in __getitem__
    return self.entries[item]
  File "C:\Users\username_0\AppData\Local\Programs\Python\Python37\lib\site-packages\merakicommons\container.py", line 95, in __getitem__
    return super().__getitem__(item)
IndexError: list index out of range
```
Example code is broken
issue
created
Satrium
username_1
Because of the ranked reset a few days ago, there are currently no challenger players. I think that's causing this issue, and should resolve itself when the first player get back into challenger.
In the meantime you could use `cass.get_master_league(queue=cass.Queue.ranked_solo_fives)` as there are already player in master.
comment
closed
jjmaldonis
username_2
issue
created
hingston
username_0
This might be a bad example to have. It is broken again. Maybe try something that will always work?

`IndexError: list index out of range`
comment