invalid_grant error
had some issues getting dependencies to pull in but now i'm running into this and a bit stumped:
Thanks for using this tool! 😊 Feel free to contribute to this project on GitHub!. If you have any questions, feel
free to reach out to me on Twitter or submit a GitHub issue.
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Getting AskReddit threads... │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
File "C:\Users\vince\Desktop\RedditBot\RedditVideoMakerBot\main.py", line 16, in <module>
reddit_object = get_askreddit_threads()
File "C:\Users\vince\Desktop\RedditBot\RedditVideoMakerBot\reddit\askreddit.py", line 26, in get_askreddit_threads
submission = list(threads)[random.randrange(0, 25)]
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\praw\models\listing\generator.py", line 63, in __next__
self._next_batch()
File "C:\Users\vince\AppData\Roaming\Python\Python310\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\vince\AppData\Roaming\Python\Python310\site-packages\praw\util\deprecate_args.py", line 43, in wrapped
return func(**dict(zip(_old_args, args)), **kwargs)
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\praw\reddit.py", line 634, in get
return self._objectify_request(method="GET", params=params, path=path)
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\praw\reddit.py", line 739, in _objectify_request
self.request(
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\praw\util\deprecate_args.py", line 43, in wrapped
return func(**dict(zip(_old_args, args)), **kwargs)
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\praw\reddit.py", line 941, in request
return self._core.request(
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\prawcore\sessions.py", line 330, in request
return self._request_with_retries(
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\prawcore\sessions.py", line 228, in _request_with_retries
response, saved_exception = self._make_request(
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\prawcore\sessions.py", line 185, in _make_request
response = self._rate_limiter.call(
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\prawcore\rate_limit.py", line 33, in call
kwargs["headers"] = set_header_callback()
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\prawcore\sessions.py", line 283, in _set_header_callback
self._authorizer.refresh()
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\prawcore\auth.py", line 425, in refresh
self._request_token(
File "C:\Users\vince\AppData\Roaming\Python\Python310\site-packages\prawcore\auth.py", line 158, in _request_token
raise OAuthException(
prawcore.exceptions.OAuthException: invalid_grant error processing request```
What version of python are you using? You may need to uninstall python and reinstall python fully.
i use python 3.10
and got it too
You good now?
I'm getting 3.10.4
You good now?
nope
Install P3.8
Install P3.8
can you send me the link?
im on https://www.python.org/downloads/release/python-380/
Your authentication is wrong. Have you set the required values in .env?
Your authentication is wrong. Have you set the required values in
.env?
I believe so, I have two factor on for reddit, not sure if that changes things but otherwise my keys should be correct and I set it up as a "script." I'm on python 3.10 but I will try 3.8 as well
Your authentication is wrong. Have you set the required values in
.env?I believe so, I have two factor on for reddit, not sure if that changes things but otherwise my keys should be correct and I set it up as a "script." I'm on python 3.10 but I will try 3.8 as well
2FA support has been merged, closing this for now - if it doesn't work for the same reason, feel free to reopen or make a new issue