uberfastman / fantasy-football-metrics-weekly-report

Command line application to create weekly reports (containing stats, metrics, and rankings) for Fantasy Football leagues on the following platforms: Yahoo, ESPN, CBS, Sleeper, Fleaflicker
GNU General Public License v3.0
202 stars 49 forks source link

Playoffs - once we enter playoffs, can reports still be generated? #166

Closed bdf0506 closed 1 year ago

bdf0506 commented 2 years ago

Not sure how this was intended, but once playoffs are entered, can reports still be generated? Not sure exactly. Still interested in some stats, if that is how this program was written.

Now that we are in playoffs, it is failing for me with an ESPN league, but not sure if this is expected or not.

2021-12-14 15:24:18,457 - root - INFO - Auto-run is set to "true". Automatically running the report for the default (most recent) week.
2021-12-14 15:24:18,458 - report.builder - INFO - 
Generating Espn Fantasy Football report with settings:
    league id: xxxxxx
    game id: nfl
    week: selected/default
    save_data: False
    refresh_web_data: False
    playoff_prob_sims: None
    break_ties: False
    dq_ce: False
    dev_offline: False
    test: False
on Dec 14, 2021...
2021-12-14 15:24:18,459 - report.builder - INFO - Retrieving fantasy football data from Espn API...
Traceback (most recent call last):
  File "/app/main.py", line 272, in <module>
    report = select_league(
  File "/app/main.py", line 209, in select_league
    return FantasyFootballReport(week_for_report=week_for_report,
  File "/app/report/builder.py", line 108, in __init__
    self.league = league_data_factory(
  File "/app/utils/report_tools.py", line 490, in league_data_factory
    espn_league = EspnLeagueData(
  File "/app/dao/platforms/espn.py", line 160, in __init__
    for matchup in self.matchups_by_week[str(week_for_rosters)]:
KeyError: '14'
TallGeekyCool commented 2 years ago

It throws a similar error for my Yahoo league that just started the playoffs. I wasn't sure if the delayed games due to COVID was the issue or not until I saw this issue report:

2021-12-22 13:39:59,813 - report.builder - INFO - Retrieving fantasy football data from Yahoo API... Traceback (most recent call last): File "/app/main.py", line 272, in report = select_league( File "/app/main.py", line 161, in select_league return FantasyFootballReport(week_for_report=week_for_report, File "/app/report/builder.py", line 108, in init self.league = league_data_factory( File "/app/utils/report_tools.py", line 459, in league_data_factory return yahoo_league.map_data_to_base(BaseLeague) File "/app/dao/platforms/yahoo.py", line 447, in map_data_to_base league_team = league.teams_by_week.get(str(week)).get(str(team_id)) # type: BaseTeam AttributeError: 'NoneType' object has no attribute 'get'

uberfastman commented 2 years ago

Sorry for the delayed updates here, but just for future reference, the app currently does not support running reports during playoffs for any platforms. Maybe at some point I could set it to check and then disable problematic features, but for the time being this would just have to be a feature request. Sorry about that!

uberfastman commented 1 year ago

Handling all variations of different platform playoffs is not currently a realistic goal, closing for now.