Comments (8)
I'm guessing this is an issue with PRAW. Though, looking at the docs, I still feel like this should work. While searching, I did find this
get_multireddit(multi, *args, **kwargs)
Return a multireddit that belongs to this user.
Parameters: multi β The name of the multireddit
Returns: Multireddit object with author=Redditor and name=multi
However, that looks like it depends on the users personal multi, not creating it with the actual address.
from rtv.
This doesn't seem to be an issue with PRAW. This can be verified by open a python console and running the following:
In [1]: import praw
In [2]: r = praw.Reddit(user_agent='my_cool_application')
In [3]: submissions = r.get_subreddit('opensource+linux').get_hot(limit=5)
In [4]: [str(x) for x in submissions]
Out[4]:
['573 :: Dell launches Ubuntu loaded machines across 500 stores in Latin America',
'8 :: Proprietary Scumminess: The Case of Dropbox',
'14 :: Enormous Changes to Google Summer of Code in 2015. Over 130 projects ou...',
'18 :: Open-Source Solutions As A Business Model',
'37 :: PuTTY 0.64 is released']
(Notice that you get results from both /r/opensource and /r/linux. This seems to be some problem with the from_name function in the SubredditContent class (defined in rtv/content.py).
from rtv.
After further investigation, it would appear that this might in fact be a bug with PRAW. It seems that that problem ultimately comes down to the line:
sub = reddit.get_subreddit('linux+opensource', fetch=True)
This returns a 404 error, while setting fetch to False does not return a 404 error. So this can be fixed by bringing that line of code back in line with the rest of code base (which uses lazy objects). This issue is fixed by #16
from rtv.
Thanks for investigating this, I'll check it out tonight. I put the fetch=True flag to verify that the subreddit actually existed. If you look in from_name(), there's a workaround for /r/all for the same reason. Have you tested your fix out with gibberish or invalid names? I remember having problems with those at the time.
from rtv.
Good point, it looks like this fails silently on gibberish names (due to the lazy loading not actually loading it). Due to that, I would say there are two options:
- Wait until the bug is fixed in PRAW (which I might take a look at a bit later tonight)
- Simply force PRAW to load it immediately afterwards by acting on the subreddit object before breaking out of the try except block (which works around the PRAW bug).
from rtv.
I don't mind option 2. We just have to make sure not to lose any data in the process of checking the generator. Maybe something like
content = cls('/r/'+sub.display_name, sub.get_hot(limit=None), loader)
content.get(0) # Validate that content exists before initializing
return content
from rtv.
Yeah that makes sense to me.
On Mar 3, 2015 8:10 PM, "michael-lazar" [email protected] wrote:
I don't mind option 2. We just have to make sure not to lose any data in
the process of checking the generator. Maybe something likecontent = cls('/r/'+sub.display_name, sub.get_hot(limit=None), loader)
content.get(0) # Validate that content exists before initializing
return contentβ
Reply to this email directly or view it on GitHub
#15 (comment).
from rtv.
Implemented ala option 2. b992645
from rtv.
Related Issues (20)
- add Twitch mime parser HOT 5
- Crash when hitting G on empty thread HOT 1
- RTV development is shutting down HOT 30
- Offering to help with the project HOT 1
- ConnectionError upon first launch
- no confirmation on exit HOT 1
- Program exited with status 127 HOT 1
- When you set $RTV_BROWSER variable to a program with options like "mybrowser -u" it basicly doesn't work HOT 1
- [1.2.7] Where is the configuration option to toggle whether to open web browser links in a new tab or a new window?
- Not being able to view remote image url via iTerm2's imgcat HOT 6
- How do I change it that rtv uses leafpad instead of nano as its default text editor?
- Save option for posts.
- Option to edit a posted comment.
- Where does rtv store the credentials or session/cookie file so I could just take a rtv install to another OS/new install and donβt have to reopen Firefox for allowing the app access?
- Version 1.27.0_1 (from brew) crashed when opening url HOT 5
- Fix incase mpv is not opening anymore
- When pressing < o > key on a reddit post rtv crashes, "Can't pickle local object" HOT 1
- Crash while trying to sign in HOT 1
- Crash while trying to open a submission link HOT 2
- Archiving Github Repository
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 rtv.