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
199 stars 49 forks source link

[Bug] Unable to run report after latest pull from main - 4f0cacf2ef1e7a4f63d54dca3ed687ae6151a34d #223

Closed brandoncruz3 closed 1 week ago

brandoncruz3 commented 1 week ago

Description of Issue

After the latest pull from the main branch - 4f0cacf2ef1e7a4f63d54dca3ed687ae6151a34d

Generating ESPN Fantasy Football report with settings:
    league id: 297966608
    game id: nfl
    week: selected/default
    start_week: default=1
    save_data: False
    refresh_web_data: False
    playoff_prob_sims: None
    break_ties: False
    dq_ce: False
    offline: False
    test: False
on Oct 08, 2024...
2024-10-08 21:26:43,250 - report.builder - INFO - Retrieving fantasy football data from ESPN API...
2024-10-08 21:27:08,877 - report.builder - INFO - ...retrieved all fantasy football data from ESPN API in 0:00:25.626558

2024-10-08 21:27:08,878 - report.builder - INFO - Retrieving bad boy data from https://www.usatoday.com/sports/nfl/arrests/ website...
Traceback (most recent call last):
  File "/opt/ffmwr/main.py", line 291, in <module>
    report = select_league(
             ^^^^^^^^^^^^^^
  File "/opt/ffmwr/main.py", line 171, in select_league
    return FantasyFootballReport(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ffmwr/report/builder.py", line 135, in __init__
    self.bad_boy_stats = self.league.get_bad_boy_stats(self.refresh_web_data, self.save_data, self.offline)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ffmwr/dao/base.py", line 248, in get_bad_boy_stats
    return BadBoyFeature(
           ^^^^^^^^^^^^^^
  File "/opt/ffmwr/features/bad_boy.py", line 49, in __init__
    super().__init__(
  File "/opt/ffmwr/features/base/feature.py", line 54, in __init__
    self._load_feature_data()
  File "/opt/ffmwr/features/base/feature.py", line 77, in _load_feature_data
    raise FileNotFoundError(
FileNotFoundError: FILE /opt/ffmwr/output/data/2024/297966608/bad_boy_data.json DOES NOT EXIST. CANNOT RUN LOCALLY WITHOUT HAVING PREVIOUSLY SAVED DATA!

Additional Information as Applicable

Fantasy Football Platform

ESPN

League ID

297966608

Operating System

macOS

Other

Any other setup/environment/settings information you might deem potentially relevant.

brandoncruz3 commented 1 week ago

I ran the test_features.py script and tried to copy these docs to the directory it was looking at but get another error from report lab due to a table being too large. Any ideas on how to generate these json docs and have them in the correct spot?

sameer095k commented 1 week ago

running into same issue on latest commit. tried turning off a lot of flags in .env to no avail.

sameer095k commented 1 week ago

@uberfastman theres a bug on line 1786 of generator.py

            or settings.reportsettings.league_high_roller_rankings_bool):

should be or settings.report_settings.league_high_roller_rankings_bool):

uberfastman commented 1 week ago

@brandoncruz3 @sameer095k thanks for the bug report, these issues have been fixed in v19.0.2 (0bc990850106e99aedd9ed088e022a66fd97c704).