RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

praw.exceptions.MissingRequiredAttributeException: Required configuration setting 'client_id' missing.

Open tievex opened this issue 4 years ago • 13 comments

so whenever i try to run the command python main.py i get this error

Logging into Reddit.
Traceback (most recent call last):
  File "C:\Users\Cirmaci\Desktop\reddit\main.py", line 71, in <module>
    main()
  File "C:\Users\Cirmaci\Desktop\reddit\main.py", line 48, in main
    reddit_object = get_obj()
  File "C:\Users\Cirmaci\Desktop\reddit\main.py", line 45, in get_obj
    reddit_obj = get_subreddit_threads()
  File "C:\Users\Cirmaci\Desktop\reddit\reddit\subreddit.py", line 41, in get_subreddit_threads
    reddit = praw.Reddit(
  File "C:\Users\Cirmaci\AppData\Local\Programs\Python\Python39\lib\site-packages\praw\util\deprecate_args.py", line 43, in wrapped
    return func(**dict(zip(_old_args, args)), **kwargs)
  File "C:\Users\Cirmaci\AppData\Local\Programs\Python\Python39\lib\site-packages\praw\reddit.py", line 258, in __init__
    raise MissingRequiredAttributeException(
praw.exceptions.MissingRequiredAttributeException: 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.

and whenever i try to run the command python3 main.py i get this error:

Traceback (most recent call last):
  File "C:\Users\Cirmaci\Desktop\reddit\main.py", line 4, in <module>
    from dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv'

and im preety sure i have all the requirements installed, any help i can get?

tievex avatar Jun 22 '22 10:06 tievex

same for me

stefpetrini avatar Jun 22 '22 11:06 stefpetrini

same here

LucyX2 avatar Jun 22 '22 14:06 LucyX2

From the looks of the first error, you either did not provide and Reddit client ID in the .env file, or the ID you provided is incorrect. For the second error, you need to install python-dotenv. You can do this by typing pip3 install python-dotenv into your command prompt or terminal.

aLtRD avatar Jun 22 '22 15:06 aLtRD

Adding on @aLtRD's explanation, you also need to make sure to rename .env.template to .env. For the Reddit client ID part, you can follow the step-by-step documentation on how to use the bot, that should clear up most issues.

prestosole avatar Jun 22 '22 18:06 prestosole

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] avatar Jul 01 '22 23:07 github-actions[bot]

I have tried all steps and followed the guide but it does not work

chillingcone426 avatar Jul 02 '22 02:07 chillingcone426

I get: Traceback (most recent call last): File "C:\Users\Owner\Downloads\RedditVideoMakerBot-master\main.py", line 5, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv'

chillingcone426 avatar Jul 02 '22 02:07 chillingcone426

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] avatar Jul 08 '22 03:07 github-actions[bot]

I get: Traceback (most recent call last): File "C:\Users\Owner\Downloads\RedditVideoMakerBot-master\main.py", line 5, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv' @chillingcone426

Read - there's no module called 'dotenv', so simply install the module! Run pip install python-dotenv, or pip3 install python-dotenv, depending on your system.

reneeqytan avatar Jul 08 '22 09:07 reneeqytan

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] avatar Jul 15 '22 02:07 github-actions[bot]

I get: Traceback (most recent call last): File "C:\Users\Owner\Downloads\RedditVideoMakerBot-master\main.py", line 5, in from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv' @chillingcone426

Read - there's no module called 'dotenv', so simply install the module! Run pip install python-dotenv, or pip3 install python-dotenv, depending on your system.

I have tried this before and I tried again but it is not the fix

chillingcone426 avatar Jul 18 '22 16:07 chillingcone426

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] avatar Jul 26 '22 02:07 github-actions[bot]

Issue closed due to being stale. Please reopen if issue persists in latest version.

github-actions[bot] avatar Aug 08 '22 01:08 github-actions[bot]