Skip to content
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

LoLException is still unhashable? #69

Closed
ghost opened this issue Apr 25, 2017 · 1 comment
Closed

LoLException is still unhashable? #69

ghost opened this issue Apr 25, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 25, 2017

I'm getting an error that seemed to have been solved in issue #46 when I want to return "N/A" for summoners with no rank.

import riotwatcher
from riotwatcher import LoLException

w = RiotWatcher(self.config.lol_api_key)

for league in w.get_league_entry(args)[str(w.get_summoner(name=theName, region=theRegion))]:
    try:
        if league["queue"] == "RANKED_SOLO_5x5":
            return league["entries"][0]["leaguePoints"])
        else:
            return "N/A"
    except LoLException as e:
        return "N/A"

yields me:

# --- Logging error ---
# *** TypeError: unhashable type: 'LoLException'
@ghost
Copy link
Author

ghost commented Apr 25, 2017

In the end it was that pip didn't update riotwatcher properly...

@ghost ghost closed this as completed Apr 25, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants