outside-edge / python-espncricinfo

Python wrapper for the ESPNCricInfo JSON API
MIT License
145 stars 64 forks source link

Trying to convert NoneType to Float isn't handeled #15

Closed Ehsan1997 closed 6 years ago

Ehsan1997 commented 6 years ago

I found error on a match that had no result, and the match ended without the second team playing a ball. So I opened match.py, and found out float conversion can cause the script to fail if there is NoneType returned. Please use exception handling or whatever you deem fit.

dwillis commented 6 years ago

@Ehsan1997 Thanks for this report.

dwillis commented 6 years ago

@Ehsan1997 can you give me the specific match for this report?

Ehsan1997 commented 6 years ago

There where 2 PSL matches. You can try any matches which did not end with a result and the second team did not bat.

Ehsan1997 commented 6 years ago

There were*

Ehsan1997 commented 6 years ago

Here's the link. http://www.espncricinfo.com/series/8679/scorecard/1128828/multan-sultans-vs-karachi-kings-11th-match/

dwillis commented 6 years ago

@Ehsan1997 sorry it has taken so long, but I just pushed a fix for this.