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

slot_position only returning "PG" #516

Open
ghost opened this issue Dec 21, 2023 · 1 comment
Open

slot_position only returning "PG" #516

ghost opened this issue Dec 21, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 21, 2023

Sport

Basketball

Summary

I'm running into an issue where I use slot_position and it only returns "PG." I don't quite understand why this is happening.

Logs/Data

Code:

box_scores = league.box_scores()
my_matchup = box_scores[4]
for player in my_matchup.home_lineup:
     print(player.name + ': ' + player.slot_position)

Output:
CJ McCollum: PG
Coby White: PG
O.G. Anunoby: PG
Cade Cunningham: PG
Naz Reid: PG
De'Anthony Melton: PG
Chris Paul: PG
Jaylen Brown: PG
Cameron Johnson: PG
Dennis Schroder: PG
Giannis Antetokounmpo: PG
Dante Exum: PG

@ghost
Copy link
Author

ghost commented Dec 21, 2023

Never mind, I was able to resolve the problem by using lineupSlot. I don't quite understand what slot_position is supposed to return, so I will leave this open in case I found an actual issue.

Code:

my_team = league.teams[1]
for player in my_team.roster:
	print(player.name + ': ' + str(player.lineupSlot))

Output:
Giannis Antetokounmpo: BE
Victor Wembanyama: IR
De'Aaron Fox: UT
Cade Cunningham: BE
Jaylen Brown: F
CJ McCollum: UT
Chris Paul: BE
O.G. Anunoby: SF
Dennis Schroder: PG
De'Anthony Melton: UT
Cameron Johnson: PF
Coby White: SG
Dante Exum: G
Naz Reid: C

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

0 participants