[GH-ISSUE #706] MatchHistory timestamp error #151

Closed
opened 2026-03-02 15:56:13 +03:00 by kerem · 0 comments
Owner

Originally created by @tcharos on GitHub (Sep 17, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/706

when trying to execute sd.MatchHistory(league, season), in all the leagues there i an issue with the season provided when it is being parsed. this occurs in seasons before 2018-2019, in all leagues.

Affected scrapers
This affects the following scrapers:

  • [ X] Match History
import soccerdata as sd
match_history = sd.MatchHistory(leagues="ENG-Premier League", seasons="1011", no_cache=True)

Error message

time data "14/08/10 12:00" doesn't match format "%d/%m/%Y %H:%M", at position 0

Contributor Action Plan

the erroneous code is located in match_history.py, line 110:
date=lambda x: pd.to_datetime(x["date"] + ' ' + x['time'], format="%d/%m/%y %H:%M")

i have tested my code to check both format="%d/%m/%y %H:%M" or format="%d/%m/%Y %H:%M"

  • I can fix this issue and will submit a pull request.
Originally created by @tcharos on GitHub (Sep 17, 2024). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/706 when trying to execute sd.MatchHistory(league, season), in all the leagues there i an issue with the season provided when it is being parsed. this occurs in seasons before 2018-2019, in all leagues. **Affected scrapers** This affects the following scrapers: - [ X] Match History ```python import soccerdata as sd match_history = sd.MatchHistory(leagues="ENG-Premier League", seasons="1011", no_cache=True) ``` **Error message** ``` time data "14/08/10 12:00" doesn't match format "%d/%m/%Y %H:%M", at position 0 ``` **Contributor Action Plan** the erroneous code is located in match_history.py, line 110: date=lambda x: pd.to_datetime(x["date"] + ' ' + x['time'], format="%d/%m/%y %H:%M") i have tested my code to check both format="%d/%m/%y %H:%M" or format="%d/%m/%Y %H:%M" - [ ] I can fix this issue and will submit a pull request.
kerem 2026-03-02 15:56:13 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#151
No description provided.