JaseZiv / worldfootballR

A wrapper for extracting world football (soccer) data from FBref, Transfermark, Understat
https://jaseziv.github.io/worldfootballR/
455 stars 60 forks source link

Problems again with fb_team_goal_logs #192

Closed jesbrz closed 1 year ago

jesbrz commented 1 year ago

If you use fb_team_goal_logs(team_urls = "https://fbref.com/en/squads/a0435291/Granada-Stats", for_or_against = "for") you get this error message: Error in .data[["Body.Part"]]: ! Column Body.Part not found in .data. Run rlang::last_error() to see where the error occurred.

JaseZiv commented 1 year ago

Ah yes I know what's going on here.

Will work on a fix over the next few days.

Thanks

JaseZiv commented 1 year ago

Tagging @szfh here...

The issue here is that Body.Part isn't available for some leagues/divisions. This would have worked without error for Granada last season as they were in LaLiga, but errors this season with them in LaLiga2...

Just need to add in error handling to account for when it is and isn't present.