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

[WhoScored] javascript undefined args when fetching data #633

Closed
alexbarnsley opened this issue Jul 7, 2024 · 2 comments · Fixed by #636
Closed

[WhoScored] javascript undefined args when fetching data #633

alexbarnsley opened this issue Jul 7, 2024 · 2 comments · Fixed by #636

Comments

@alexbarnsley
Copy link
Contributor

When fetching the data from whoscored.com, I've started receiving the below error. Upon a little investigation, it seems the var path has been changed again (based on the recent PR #618)

selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read properties of undefined (reading 'args')

As you can see in the screenshot below, the formatting seems to have changed compared to what is being looked for, and I've not been around long enough to know what the correct data should look like?:

image

In case it's relevant only for a specific match, it's occurring on /Matches/1245647/Live

Versions:

soccerdata: 1.8.1
selenium: 4.22.0
undetected-chromedriver: 3.5.5

P.S. Great work with this library!

Thanks,

Alex

@probberechts
Copy link
Owner

There is no event data for the game you are referring to. You can see this because there is no widget with the line-ups, chalkboard, etc. under the "Match Centre" tab.

It seems that I forgot to update the error-handling logic in #618. I assume there will be no issues for games for which event data is available.

probberechts added a commit that referenced this issue Jul 8, 2024
Previously, the javascript variable that stores all events was empty when no
events were available for a given game. Since the change fixed in #618, the
javascript variable is missing instead, resulting in a `JavascriptException`.
This commit updates the error handling accordingly.

Closes #633
@alexbarnsley
Copy link
Contributor Author

That's good to know. I tested using the branch/PR and it all seems to be working without issues now, thanks!

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

Successfully merging a pull request may close this issue.

2 participants