Moved the get_players function inside the with statement