Skip to content

Comments

HypeTrain return empty shared_train_participants list if not shared_train#529

Merged
chillymosh merged 2 commits intoPythonistaGuild:mainfrom
jrutschke:hype_train_not_shared_fix
Feb 21, 2026
Merged

HypeTrain return empty shared_train_participants list if not shared_train#529
chillymosh merged 2 commits intoPythonistaGuild:mainfrom
jrutschke:hype_train_not_shared_fix

Conversation

@jrutschke
Copy link
Contributor

@jrutschke jrutschke commented Feb 1, 2026

Description

Small fix to fix to resolve TypeError for all hype train events. If not a shared train, return empty list for shared_train_participants.
Problem in BaseHypeTrain causes the same error for hype train begin, progress and end due to 'shared_train_participants' in event being None.

File "/twitchio/models/eventsub_.py", line 4960, in __init__
    self.shared_train_participants: list[PartialUser] = [
                                                        ^
TypeError: 'NoneType' object is not iterable

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have updated the changelog with a quick recap of my changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
  • I have read and agree to the Developer Certificate of Origin for this contribution

@chillymosh
Copy link
Collaborator

LGTM

@EvieePy
Copy link
Member

EvieePy commented Feb 12, 2026

Did you ever verify if this fixes your issue? If not I can look into it for you.

@jrutschke
Copy link
Contributor Author

Unfortunately no new Hype Train Event since then. Hopefully this weekend latest.

@jrutschke jrutschke marked this pull request as ready for review February 21, 2026 19:43
@jrutschke
Copy link
Contributor Author

Finally verified! Ready to merge.

@chillymosh chillymosh merged commit 36d6129 into PythonistaGuild:main Feb 21, 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.

3 participants