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] v16 TypeError #199

Closed jdk301 closed 1 year ago

jdk301 commented 1 year ago

Description of Issue

The latest version (v16.0.0) introduces a type error after running the startup command docker exec -it fantasy-football-metrics-weekly-report-app-1 python main.py (using Yahoo)

Traceback (most recent call last):
  File "/opt/ffmwr/main.py", line 299, in <module>
    report = select_league(
             ^^^^^^^^^^^^^^
  File "/opt/ffmwr/main.py", line 175, in select_league
    return FantasyFootballReport(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ffmwr/report/builder.py", line 54, in __init__
    self.platform_display: str = format_platform_display(platform)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ffmwr/utilities/utils.py", line 11, in format_platform_display
    return platform.capitalize() if len(platform) > 4 else platform.upper()
                                    ^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Note: pulled branch release/v15.0.0 & successfully generated report

Additional Information as Applicable

Downgraded to run v15 & it works successfully.

Fantasy Football Platform

Yahoo

League ID

XXXXXX...

Operating System

macOS

PS: I found this repo through a friend and just wanted to thank you! The reports are awesome, keep up the good work 🙌

uberfastman commented 1 year ago

@jdk301 thanks so much for catching this bug right away, I've pushed a fix in v16.0.1 in 7b7415a3178f93db6d68cfe65dc59f63a23d8b3c