mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[GH-ISSUE #544] [FBref] Error getting player1 in some events #98
Labels
No labels
ESPN
FBref
FotMob
MatchHistory
SoFIFA
Sofascore
WhoScored
WhoScored
bug
build
common
dependencies
discussion
documentation
duplicate
enhancement
good first issue
invalid
performance
pull-request
question
question
removal
understat
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/soccerdata#98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nachouve on GitHub (Apr 16, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/544
Issue Summary:
I encountered an issue with soccerdata while parsing HTML for certain events in FBref.
Details:
The error occurs in this line of the code where the player1 variable is set. Sometimes, there is no tag present here, but it has the name of person who was issued with a yellow card, for example.
Steps to Reproduce:
Expected Behavior:
The read_events() function should handle cases where the tag is missing gracefully, rather than causing an error.
@nachouve commented on GitHub (Apr 17, 2024):
Issue Update:
It appears that the changes made in this commit address the reported problem.
Request for Review:
As I'm not familiar with some of the technologies used in the project, @probberechts I would appreciate any guidance on potential improvements or corrections needed before merging the fix.
Thank you in advance for your assistance.
@probberechts commented on GitHub (Apr 18, 2024):
I've added a suggestion on how to implement this a bit more cleaner. But functionally, your fix seems ok. Would you be able to create a pull request?
@nachouve commented on GitHub (Apr 18, 2024):
Perfect. I'll do it. Thank you!