Skip to content

Fixed TeamList length access in March Madness agent#183

Merged
drbrady8800 merged 1 commit intomainfrom
fix-TeamList-no-len-error
May 14, 2025
Merged

Fixed TeamList length access in March Madness agent#183
drbrady8800 merged 1 commit intomainfrom
fix-TeamList-no-len-error

Conversation

@emmakodes
Copy link
Contributor

Fixed TypeError when accessing TeamList length by correctly accessing the teams attribute.

Changes:

  • Modified len(teams_list) to len(teams_list.teams) to properly count the number of teams
  • This fixes the AttributeError that occurred when trying to get the length of the TeamList object directly

The error occurred because TeamList is a Pydantic model containing a list of teams in its 'teams' attribute, and we need to access that attribute to get the actual count of teams.

@emmakodes emmakodes requested a review from drbrady8800 May 14, 2025 13:54
@drbrady8800 drbrady8800 merged commit 85a29c2 into main May 14, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants