Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lineups are only populating for first and current week matchups #524

Open
wsecheng opened this issue Jan 16, 2024 · 6 comments
Open

Lineups are only populating for first and current week matchups #524

wsecheng opened this issue Jan 16, 2024 · 6 comments

Comments

@wsecheng
Copy link

wsecheng commented Jan 16, 2024

Sport

Basketball

Summary

I'm trying to pull the players + stats that participated in every matchup throughout the year, but I'm seeing that home_lineup and away_lineup attributes only return a non-empty list for teams in the first and current week matchups.

Logs/Data

for week in range(league.currentMatchupPeriod):
    for matchup in league.box_scores(matchup_period = week+1):
        print(week)
        print(matchup)

        # returns empty list when week is not 1 nor league.currentMatchupPeriod
        for player in matchup.home_lineup:
            print(player)

        for player in matchup.away_lineup:
            print(player)
@cwendt94
Copy link
Owner

what type of scoring league is this? I am able to see all the lineups for my H2H points league.

@wsecheng
Copy link
Author

It's a H2H cats league

@cwendt94
Copy link
Owner

Okay, I tried by cats league and seeing the same issue. I will take a look.

@cwendt94
Copy link
Owner

So the issue is mapping the matchup_period to a scoring_period. For CAT leagues it seems like the way we find scoring period does not work the same for H2H points. Right now I can't seem to find out how to see all the scoring periods in a matchup. To get around this issue for now if you also define a scoring_period to each of your matchup calls it should get the lineups correctly.

@wsecheng
Copy link
Author

wsecheng commented Mar 5, 2024

What scoring_period meant to represent and what should it be set to?

EDIT: I can see from browsing my league URL, that scoring_period typically equals matchup_period * 7 -1.

@cwendt94
Copy link
Owner

cwendt94 commented Mar 6, 2024

Yeah the scoring_period is the actual day of games being played. So the opening day of games for the season scoring_period=1 second day of games scoring_period=2. And it keeps increasing for every day there are games.

H2H scoring had a way to get all of the scoring periods in a matchup but right now I can't find that data when the league is CAT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants