Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

In what cases there will not be 'hero_damage' in response of get_match_detail() call? #67

Open
zhouy1017 opened this issue May 16, 2017 · 1 comment

Comments

@zhouy1017
Copy link

I am working on about 5000 records of match details returned by get_match_detail call.
And I got some keyerrors due to in some [player] there is no 'hero_damage' key but in the document, there should always be 'hero_damage',right?

@joshuaduffy
Copy link
Owner

I assume this is dependant on if damage was actually accrued or not, if you use something like

if 'hero_damage' in dictionary:
    dmg  = dictionary['hero_damage']

You should be able to get at the key in a loop (if it exists) without any exceptions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants