Closed aggin23 closed 4 years ago
@aggin23 I'm also having this error, were you able to fix it?
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.
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.
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'