cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
652 stars 209 forks source link

Unexpected Behavior: API Output Printing with Each Command #106

Closed dkelly-proj closed 4 years ago

dkelly-proj commented 4 years ago

This may be an issue with my settings or something locally, but this is behavior that I just started encountering today. Below is some simple code to build a dataframe of games throughout the regular season of my league. I would not expect any of these lines to generate output, but it seems like each iteration of the for loops cause the JSON response from the API to be printed. This occurs even when running from the command line.

If this isn't an issue with the package I'll close and look elsewhere. I appreciate any help!

image

cwendt94 commented 4 years ago

It looks like you are running the package in debug mode. How are you initializing the league object? You want to make sure you assign each value in the constructor like

league = League(league_id=1234, year=2020, swid='{123-456-789}', espn_s2='4657983486')
dkelly-proj commented 4 years ago

Yikes, yes I was passing debug = True for some reason when initializing the league object. Working just fine now that I removed that. Thanks for the assist.

cwendt94 commented 4 years ago

Awesome, no problem!