reddit-replier
reddit-replier copied to clipboard
Crashes with configparser.NoSectionError with current version of PRAW
Replier
is passing self.user_agent
as an unnamed argument to praw.Reddit()
, but in the latest version of PRAW the first unnamed argument is a site-name (referring to a token in a praw.ini file). Initializing a bot therefore crashes with:
configparser.NoSectionError: No section: 'redditreplier v1.0.0a1 by /u/naiyt'
You provided the name of a praw.ini configuration which does not exist.
This can presumably be fixed by changing praw.Reddit(self.user_agent)
to praw.Reddit(user_agent=self.user_agent)
.
Thanks for the report, I actually haven't touched this in years...looks like you have a good idea of the fix, if you have time would you mind opening a PR?
Will do.
Anything happening with this? Latest version doesn't seem to be fixed.
(no idea how PRs work, didn't do this before)
I'm guessing @jonathangjertsen hasn't had time to put together a PR for it yet. If you'd like to use the fix he recommended you could edit the source and add his recommended change where you're running the code.
Yah, did that, now gives me
praw.exceptions.ClientException: required configuration setting 'client_id' is missing.
This setting can be provided in a praw.ini file, as a keyword argument to the
I have just added a PR modifying the relevant line @jonathangjertsen was referencing. This is my first time doing a PR request, so please feel free to point out anything else I might need to do if I have somehow managed to botch things up!