mattdodge / yahoofantasy

A Python SDK for the Yahoo! Fantasy Sports API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValueError: 2023 is not a valid season for nfl

Clarkbar36 opened this issue · comments

I wanted to gather matchup data for the fantasy NFL current season, but when I go to get my NFL leagues for the 2023 season, I get this error:

ValueError: 2023 is not a valid season for NFL

Code Snippet:

`from yahoofantasy import Context

ctx = Context()
leagues = ctx.get_leagues('nfl', 2023)
for league in leagues:
print(league.name + " -- " + league.league_type)`

Be sure you're on the latest version of the library. 2023 support for NFL was added in version 1.4.2 back in September

To upgrade:

pip install -U yahoofantasy

That did it, didn't realize I was still on 1.4.1. Thanks, Matt!