Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MatchHistory timestamp error #706

Closed
1 task
tcharos opened this issue Sep 17, 2024 · 0 comments · Fixed by #722
Closed
1 task

MatchHistory timestamp error #706

tcharos opened this issue Sep 17, 2024 · 0 comments · Fixed by #722
Labels
bug Something isn't working

Comments

@tcharos
Copy link

tcharos commented Sep 17, 2024

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant