mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 10:05:53 +03:00
[GH-ISSUE #909] [WhoScored] ValueError: time data 'Aug' does not match format '%b' #199
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#199
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 @salvassc on GitHub (Dec 22, 2025).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/909
Describe the bug
With Python version 3.10.11 and soccerdata library version 1.8.7, I get the error "ValueError: time data 'Aug' does not match format '%b'" when executing calls to some functions
Affected scrapers
This affects the following scrapers:
Code example
Error message
@probberechts commented on GitHub (Jan 6, 2026):
Is your OS or Python environment set to a non-English locale? You can check this by running the following in Python:
If that is the issue, you can fix this by forcing an English locale in your session:
or by setting an environment variable
The ideal long-term fix would be for
soccerdatato parse dates using locale-independent logic or explicitly set locale when parsing. But until that’s changed upstream, the above would be an easy workaround.@salvassc commented on GitHub (Jan 13, 2026):
Yes, my OS non English locale
If i use locale.setlocale(locale.LC_TIME, "C"), do i have to add that code to every cell.
Is there a way to apply that to all cells in my Jupiter Notebook?
@probberechts commented on GitHub (Jan 13, 2026):
Running it once at the beginning of your notebook should be sufficient. You can also start your notebook server with a specific locale by running:
@salvassc commented on GitHub (Jan 13, 2026):
Thanks for the suggestion. I tried running
import locale; locale.setlocale(locale.LC_TIME, "C")at the very beginning of the notebook, before importing soccerdata.However, in VS Code with Jupyter on Windows, this does not reliably apply to the whole notebook: it only works in the cell where it is executed, and subsequent cells still fail with the same locale-related error.
I understand that starting Jupyter with LC_ALL=C would be the cleanest solution, but this has been difficult to apply consistently in my Windows environment.