twitter-openapi icon indicating copy to clipboard operation
twitter-openapi copied to clipboard

validation errors for CommunityData

Open laszlovandenhoek opened this issue 4 months ago • 0 comments

Another deserialization error, happens with this tweet:

https://x.com/effectfully/status/1860347907615924669

pydantic_core._pydantic_core.ValidationError: 2 validation errors for CommunityData
__typename
  Input should be 'TimelineTweet', 'TimelineTimelineItem', 'TimelineUser', 'TimelineTimelineCursor', 'TweetWithVisibilityResults', 'ContextualTweetInterstitial', 'TimelineTimelineModule', 'TweetTombstone', 'TimelinePrompt', 'TimelineMessagePrompt', 'TimelineCommunity', 'TimelineTombstone', 'TimelineTrend', 'TimelineNotification', 'TimelineNotificationAggregateUserActions', 'TweetUnavailable', 'TweetPreviewDisplay', 'Tweet', 'User', 'UserUnavailable', 'Community', 'CommunityDeleteActionUnavailable', 'CommunityJoinAction', 'CommunityJoinActionUnavailable', 'CommunityLeaveActionUnavailable', 'CommunityTweetPinActionUnavailable', 'CommunityTweetUnpinActionUnavailable', 'CommunityInvitesUnavailable', 'CommunityJoinRequestsUnavailable' or 'ApiImage' [type=enum, input_value='CommunityUnavailable', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/enum
id_str
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type

This is in the JSON:

"community_results": {
   "result": {
      "__typename": "CommunityUnavailable"
   }
}

laszlovandenhoek avatar Sep 06 '25 10:09 laszlovandenhoek