Comments (4)
That's a relief! I'll leave this open until I release a more substantial fix.
from redd.
Don't worry about it, working with the reddit API has more than trained me to deal with vagueness and inconsistency 😉. After doing some research, this may be a combination of issues on both reddit's and my end.
Temporary Fix (?)
Could you try comment.reload
and then see if that loads the comments? If it does, I can be sure that the issue is what I think it is. Thanks a lot for your help!
Details
I'll describe this in intense detail to help anyone in the future struggling with this obscure aspect of the reddit API.
All comment (t1
) objects have an attribute called replies
. If the comment has replies, it's a Listing
. If the comment has no replies or if the replies aren't included in this response (like from a /api/info
call) the replies
key is an empty string, instead of an empty listing or just null like a sane API. Reddit's mobile website does a sort of check as well (commentTreeUtils.js).
Redd assumed that an empty string meant no comments, which is clearly incorrect.
- see reddit/reddit#662
- see https://redd.it/17s9l4
from redd.
reload
works! Thanks so much.
from redd.
Hi @avinashbot, any updates on this? I'm having a similar issue on master and reloading the comment doesn't fix it.
from redd.
Related Issues (20)
- Add ability to stream messages. HOT 1
- 'before' options returns too many things
- `it': couldn't guess app type (RuntimeError) in redd-0.9.0.pre.3
- :permalink is inaccessible on a comment
- Retrieving Comments using name HOT 1
- NoMethodError: undefined method `stream' for #<Redd::Models::Listing:0x00007fe99deb75b0> HOT 3
- Next page
- Redd::Models::Comment#new removed in 0.8.x and 0.9.x? HOT 1
- Ability to invite users to live threads HOT 1
- LazyLazer::MissingAttribute: `replies is missing for #<Redd::Models::Comment:0x00007fdb68aa5190>
- ArgumentError at Middleware.
- Redd::Models::Comment.from_id throwing key not found :author
- Retrieving list of Subreddit emojis HOT 1
- Unit Testing HOT 1
- flair_listing: cannot unmarshal HOT 1
- Token not refreshing
- Getting NoMethodError (undefined method `new' for nil:NilClass) HOT 1
- NoMethodError (undefined method `access_token' for #<Redd::Models::Access:0x00007fb75d2f95b0>): HOT 1
- Updating dependencies
- Abandoned Gem? Broken with Ruby 3.0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redd.