RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

hi, here i come with another issue

Open Sgegsdge opened this issue 4 years ago • 16 comments

after running main.py this is what i get:

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Getting AskReddit threads... │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ Traceback (most recent call last): File "C:\Users(my username)\RedditVideoMakerBot\main.py", line 16, in reddit_object = get_askreddit_threads() File "C:\Users(my username)\RedditVideoMakerBot\reddit\askreddit.py", line 26, in get_askreddit_threads submission = list(threads)[random.randrange(0, 25)] File "C:\Users(my username)\anaconda3\lib\site-packages\praw\models\listing\generator.py", line 63, in next self._next_batch() File "C:\Users(my username)\anaconda3\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(my username)\anaconda3\lib\site-packages\praw\util\deprecate_args.py", line 43, in wrapped return func(**dict(zip(_old_args, args)), **kwargs) File "C:\Users(my username)\anaconda3\lib\site-packages\praw\reddit.py", line 634, in get return self._objectify_request(method="GET", params=params, path=path) File "C:\Users(my username)\anaconda3\lib\site-packages\praw\reddit.py", line 739, in _objectify_request self.request( File "C:\Users(my username)\anaconda3\lib\site-packages\praw\util\deprecate_args.py", line 43, in wrapped return func(**dict(zip(_old_args, args)), **kwargs) File "C:\Users(my username)\anaconda3\lib\site-packages\praw\reddit.py", line 941, in request return self._core.request( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 330, in request return self._request_with_retries( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 228, in _request_with_retries response, saved_exception = self._make_request( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 185, in _make_request response = self._rate_limiter.call( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\rate_limit.py", line 33, in call kwargs["headers"] = set_header_callback() File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 283, in _set_header_callback self._authorizer.refresh() File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\auth.py", line 425, in refresh self._request_token( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\auth.py", line 158, in _request_token raise OAuthException( prawcore.exceptions.OAuthException: unauthorized_client error processing request (Only script apps may use password auth)

what should i do???

Sgegsdge avatar Jun 02 '22 16:06 Sgegsdge

When you made the Reddit app you accidentally didn't select script

JasonLovesDoggo avatar Jun 02 '22 16:06 JasonLovesDoggo

When you made the Reddit app you accidentally didn't select script

okay, so i created a new app and changed everything in .env, but i got a new error:

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Getting AskReddit threads... │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ Traceback (most recent call last): File "C:\Users(my username)\RedditVideoMakerBot\main.py", line 16, in reddit_object = get_askreddit_threads() File "C:\Users(my username)\RedditVideoMakerBot\reddit\askreddit.py", line 26, in get_askreddit_threads submission = list(threads)[random.randrange(0, 25)] File "C:\Users(my username)\anaconda3\lib\site-packages\praw\models\listing\generator.py", line 63, in next self._next_batch() File "C:\Users(my username)\anaconda3\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(my username)\anaconda3\lib\site-packages\praw\util\deprecate_args.py", line 43, in wrapped return func(**dict(zip(_old_args, args)), **kwargs) File "C:\Users(my username)\anaconda3\lib\site-packages\praw\reddit.py", line 634, in get return self._objectify_request(method="GET", params=params, path=path) File "C:\Users(my username)\anaconda3\lib\site-packages\praw\reddit.py", line 739, in _objectify_request self.request( File "C:\Users(my username)\anaconda3\lib\site-packages\praw\util\deprecate_args.py", line 43, in wrapped return func(**dict(zip(_old_args, args)), **kwargs) File "C:\Users(my username)\anaconda3\lib\site-packages\praw\reddit.py", line 941, in request return self._core.request( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 330, in request return self._request_with_retries( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 228, in _request_with_retries response, saved_exception = self._make_request( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 185, in _make_request response = self._rate_limiter.call( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\rate_limit.py", line 33, in call kwargs["headers"] = set_header_callback() File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\sessions.py", line 283, in _set_header_callback self._authorizer.refresh() File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\auth.py", line 425, in refresh self._request_token( File "C:\Users(my username)\anaconda3\lib\site-packages\prawcore\auth.py", line 158, in _request_token raise OAuthException( prawcore.exceptions.OAuthException: invalid_grant error processing request

sorry for asking for help so much, im not really familliar with coding

Sgegsdge avatar Jun 02 '22 17:06 Sgegsdge

you put the variables in wrong. keep the quotes

JasonLovesDoggo avatar Jun 02 '22 17:06 JasonLovesDoggo

all good for asking!

JasonLovesDoggo avatar Jun 02 '22 17:06 JasonLovesDoggo

@JasonLovesDoggo I have the same prawcore issue but i already checked multiple times if my .env variables are correct what could be the issue for me?

furilofox avatar Jun 02 '22 20:06 furilofox

Are you absolutely sure the variables are correct. And is it the exact same error msg And do you have the quotes in the .env

JasonLovesDoggo avatar Jun 02 '22 23:06 JasonLovesDoggo

@JasonLovesDoggo If the Username and Password thats asked for is supposed to be the information i Login with then yes it is correct

furilofox avatar Jun 03 '22 04:06 furilofox

Also the client ID and client secret

JasonLovesDoggo avatar Jun 03 '22 04:06 JasonLovesDoggo

Client ID i Put the String below the App Name and Secret the Secret

furilofox avatar Jun 03 '22 04:06 furilofox

Client ID i Put the String below the App Name and Secret the Secret

Hi! Are you still having issues?

FreebieII avatar Jun 03 '22 16:06 FreebieII

Hi! Are you still having issues? Yep and i have No clue why... Maybe because of 2 factor auth?

furilofox avatar Jun 03 '22 20:06 furilofox

Have you redownloaded recently? A fix for 2FA was added

callumio avatar Jun 03 '22 20:06 callumio

I have the same issue did yall solve it ?

HimashaHerath avatar Jun 05 '22 05:06 HimashaHerath

and if yes where was the issue ?

HimashaHerath avatar Jun 05 '22 05:06 HimashaHerath

and if yes where was the issue ?

Seems like it was in issue with the 2FA system.

FreebieII avatar Jun 06 '22 19:06 FreebieII

Hi @Sgegsdge

I hope you were able to resolve your issue as there has not been activity in this Issue, I will be closing this for the time being. Feel free to re-open the issue if it has not been solved!!

Happy Coding!

FreebieII avatar Jun 06 '22 19:06 FreebieII