Closed pferreira8 closed 5 months ago
Ran into the same problem. Just to help debug, I'm narrowed down the exact date where the error occurs, which is 2024-05-14
. This works
# Initialize API object
mlb = mlbstatsapi.Mlb()
# Get games
all_games = mlb.get_scheduled_games_by_date(
start_date="2024-05-01", end_date=""2024-05-13", gameTypes="R"
)
And this also works
# Initialize API object
mlb = mlbstatsapi.Mlb()
# Get games
all_games = mlb.get_scheduled_games_by_date(
start_date="2024-05-15", end_date=""2024-05-24", gameTypes="R"
)
However passing a date range that includes "2024-05-14" in it will result in the error referred to above. I assume it's from some sort of weird data for a game that day (I see there's a postponed game then).
Looks like the MLB API was updated recently. Thats why it's only throwing that "missing required positional argument' TypeError after a certain date!
I'll get on fixing that as soon as I can. Thanks for the heads up guys!
pferreira8 and mlwilliams217, Apologies for the delay, some things came up IRL but everything should be working and published. Update and give it a go
pferreira8 and mlwilliams217, Apologies for the delay, some things came up IRL but everything should be working and published. Update and give it a go
great to hear!
I have some code that was working last I checked a few months ago and no longer the case.
self.api is set = mlb.Mlb()
TypeError: ScheduleGames.init() missing 1 required positional argument: 'ifnecessarydescription'