Fixing error: praw.exceptions.ClientException: Required configuration setting ‘client_id’ missing.

If you use a project on Github that uses the Reddit API, you can get errors like this:

Traceback (most recent call last):
  File "subredditarchive.py", line 23, in 
    r = praw.Reddit(useragent='searchandarchive by ')
  File "/usr/local/lib/python2.7/dist-packages/praw-4.0.0b17-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.

The API library in Python is called “praw” – you most likely have the wrong version.

To see the version, do this:

pip freeze | grep praw

Then uninstall:

pip uninstall praw

Then install the right version:

easy_install praw==3.5.0

Interested in Python? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *