The issue is caused by the fact that Listing assumes that all Listings sent by the Reddit API are comprised of Models, which is not the case for many of them, but happens to be the case for all Listings implemented by Redd except for Subreddit.flair_listing, which is currently not functional. The solution is to remove this assumption from Listing, then convert all other uses to a new class, ModelListing, which marshals all Listing elements as with current behavior.
I will be making a pull request implementing this change soon.
I am running the following code:
And getting this error:
The issue is caused by the fact that
Listing
assumes that all Listings sent by the Reddit API are comprised of Models, which is not the case for many of them, but happens to be the case for all Listings implemented by Redd except forSubreddit.flair_listing
, which is currently not functional. The solution is to remove this assumption fromListing
, then convert all other uses to a new class,ModelListing
, which marshals all Listing elements as with current behavior.I will be making a pull request implementing this change soon.