Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRAW 4.0.0b23 does not have "get_subreddit" call and now requires auth #31

Open
Krabby127 opened this issue Nov 23, 2016 · 4 comments
Open

Comments

@Krabby127
Copy link
Contributor

Traceback (most recent call last): File "./change_wallpaper_reddit.py", line 166, in <module> r = praw.Reddit(user_agent="Get top wallpaper from /r/{subreddit} by /u/ssimunic".format(subreddit=subreddit)) File "/usr/local/lib/python2.7/dist-packages/praw-4.0.0b23-py2.7.egg/praw/reddit.py", line 101, in __init__ raise ClientException(required_message.format(attribute)) praw.exceptions.ClientException: Required configuration setting 'client_id' missing. This setting can be provided in a praw.ini file, as a keyword argument to the Reddit class constructor, or as an environment variable.

If I add my client_id and client_secret to the initializer, I get a different error:

r = praw.Reddit(user_agent="Get top wallpaper from /r/{subreddit} by u/ssimunic".format(subreddit=subreddit), client_id='[redacted]', client_secret='[redacted]')

Traceback (most recent call last): File "./change_wallpaper_reddit.py", line 171, in <module> image = get_top_image(r.get_subreddit(subreddit)) AttributeError: 'Reddit' object has no attribute 'get_subreddit'

@plscks
Copy link

plscks commented Dec 22, 2016

Can confim, praw 4 breaks this script.

@spectre013
Copy link

Locally I updated the code and had to change the get_subreddit to just subreddit and in the get_new function had to change the get_new and get_top to just new/top.

Also signed up for a personal developer app to get the keys and it works just fine. Would be best if the author created the app to work with oAuth then you could just signin and use it that way. That is my guess why he hasn't updated the app to work with the latest version of PRAW.

@jenroper
Copy link

I updated the version in my fork to use praw 5.0.1. You are welcome to use it.
You just need to add your client_id and client_secret to the praw.ini file.

@remggo
Copy link
Contributor

remggo commented Aug 31, 2017

@jenroper Thanks, I will check it out this afternoon.

Btw: Is this Project still actively maintained? Would it be better to fork and maintain it separately?

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

No branches or pull requests

5 participants