uberfastman/fantasy-football-metrics-weekly-report

[Bug] v16 TypeError

Closed this issue · 1 comments

jdk301 commented

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 🙌

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