Adam-Jimenez / auddit

Tired of those Reddit text-to-speech videos on Youtube? Now you can make your own!
https://www.youtube.com/channel/UCMi63vc1Timv8dfrmcrrdFQ
MIT License
97 stars 23 forks source link

Client ID Error #19

Closed aggin23 closed 4 years ago

aggin23 commented 4 years ago

Traceback (most recent call last): File "C:/Users/Meridius/Desktop/auddit-master (1)/auddit-master/src/main.py", line 1, in from tasks.scrape_reddit.task import get_hottest_post File "C:\Users\Meridius\Desktop\auddit-master (1)\auddit-master\src\tasks\scrape_reddit\task.py", line 6, in client_id = os.environ["MYKEYHERE"] File "C:\Users\Meridius\AppData\Local\Programs\Python\Python38-32\lib\os.py", line 675, in getitem raise KeyError(key) from None KeyError: 'MYKEYHERE'

Zuccy commented 4 years ago

@aggin23 I'm also having this error, were you able to fix it?

aggin23 commented 4 years ago

EDIT: WRONG Thread. I don' really remember what I did, but yeah I fixed every error. I think you need to add the Reddit key to your system environment variable.

alphanumericaltycoon commented 3 years ago

Just for everyone's benefit - you can set your system environmental variable by writing in the terminal the following commands:

$export REDDIT_CLIENT_ID=YOURCODEFROMREDDITHERE $export REDDIT_CLIENT_SECRET=YOURCODEFROMREDDITHERE

This will set the variables which you can then confirm by using the command echo $REDDIT_CLIENT_ID (this will return the code string that you entered)

echo $REDDIT_CLIENT_SECRET (this will return the code string that you entered)

I'm new to Linux but from what I gathered you need to do this every time you open a terminal window in order for the script to work.