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 "", 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/", 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

If you're looking for a Python book, Natural Language Processing with Python is a great way to learn the language while building some really interesting projects.

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 *