mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[GH-ISSUE #889] [SoFIFA] Read_player_ratings return only 1 record #192
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#192
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 @mttam on GitHub (Sep 18, 2025).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/889
Describe the bug
the method read_player_ratings return only the last player. Specifically because there is an incorrect indentation of tht XPath extraction and ratings.append() are outside the player loop, so only the last player's scores are processed and appended.
Python Version
Python 3.11.4
Affected scrapers
This affects the following scrapers:
Code example
Error message
Error output
Additional context
I fix the problem with GPT-5 mini but im not sure is the correct way (or an effective issue) because i only dowload the collection.
Code fix sofifa.py
Contributor Action Plan
@crossin commented on GitHub (Sep 29, 2025):
I also encountered this issue, and I've tried adding one more level of indentation to this part of the original code can resolve it.
from
for s in score_labels:to
ratings.append(scores)