Skip to content

Fix RuntimeError when iterating players with certain status filters#86

Merged
mattdodge merged 1 commit into
masterfrom
fix/player-collection-string-entries
May 13, 2026
Merged

Fix RuntimeError when iterating players with certain status filters#86
mattdodge merged 1 commit into
masterfrom
fix/player-collection-string-entries

Conversation

@mattdodge

@mattdodge mattdodge commented May 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Yahoo API returns string entries (e.g. "player_key") mixed into the player list for certain status filters (A, W), rather than only player dictionaries
  • These appear to be field-name artifacts from the XML schema slipping through the badgerfish XML-to-JSON converter
  • from_response_object raises a RuntimeError when it encounters a string instead of a dict
  • Fix: skip any non-dict entries when iterating the player list in League.players()

Fixes #85

Yahoo API returns string entries (e.g. "player_key") mixed into the
player list for certain filters (A, W), causing a RuntimeError in
from_response_object. Skip any non-dict items to handle this gracefully.

Fixes #85

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mattdodge
mattdodge merged commit 85fe1a4 into master May 13, 2026
8 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.

Issue with resolving Player collection in League object

1 participant