Getting AskReddit threads...
Enter your two-factor authentication code from your authenticator app.
891224
Traceback (most recent call last):
File "c:\Users\fabia\Dropbox\PC (2)\Documents\Coding\Python\RedditVideoMakerBot-master\main.py", line 19, in
reddit_object = get_subreddit_threads()
File "c:\Users\fabia\Dropbox\PC (2)\Documents\Coding\Python\RedditVideoMakerBot-master\reddit\subreddit.py", line 52, in get_subreddit_threads
submission = list(threads)[random.randrange(0, 25)]
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\praw\models\listing\generator.py", line 63, in next
self._next_batch()
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\praw\models\listing\generator.py", line 89, in _next_batch
self._listing = self._reddit.get(self.url, params=self.params)
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\praw\util\deprecate_args.py", line 43, in wrapped
return func(**dict(zip(_old_args, args)), **kwargs)
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\praw\reddit.py", line 634, in get
return self._objectify_request(method="GET", params=params, path=path)
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\praw\reddit.py", line 739, in _objectify_request
self.request(
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\praw\util\deprecate_args.py", line 43, in wrapped
return func(**dict(zip(_old_args, args)), **kwargs)
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\praw\reddit.py", line 941, in request
return self._core.request(
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\prawcore\sessions.py", line 330, in request
return self._request_with_retries(
File "C:\Users\fabia\AppData\Local\Programs\Python\Python310\lib\site-packages\prawcore\sessions.py", line 266, in _request_with_retries
raise self.STATUS_EXCEPTIONSresponse.status_code
prawcore.exceptions.BadRequest: received 400 HTTP response
Hi,
Which subreddit are you trying to pull from?
in the .env i have put r/AskReddit
I figured it out, thanks for the help tho
in the .env i have put r/AskReddit
Hi,
You should only place the name of the subreddit in your .env file, the r/ is not required. Happy to hear that you got it working!