Closed johncoxon closed 3 years ago
I've created a pull request which (hopefully) should fix this issue. There may still be a NoScorecardError that needs to be handled. https://github.com/dwillis/python-espncricinfo/pull/45
Edit: the error is caused because it is getting upcoming matches, idk if there's a way to get past or only live matches
Accessing Summary.match_ids gives this error.
Traceback (most recent call last): File "C:\Users\DELL PC\Desktop\github\cricket app\python-espncricinfo\script.py", line 2, in <module> s = Summary() File "C:\Users\DELL PC\Desktop\github\cricket app\python-espncricinfo\espncricinfo\summary.py", line 12, in __init__ self.match_ids = self._match_ids() File "C:\Users\DELL PC\Desktop\github\cricket app\python-espncricinfo\espncricinfo\summary.py", line 30, in _match_ids matches = [x['id'] for x in self.summary_json()['props']['pageProps']['data']['content']['leagueEvents'][0]['matchEvents']] KeyError: 'content'
I don't know how to proceed from here on, can someone help me out?
When I run the following code, I get the traceback below.
I'm not certain what I'm doing wrong here, can someone help me out?