reddit-place-script-2022 icon indicating copy to clipboard operation
reddit-place-script-2022 copied to clipboard

ERROR - Authorization failed! NoneType: None

Open KingWifi opened this issue 3 years ago • 9 comments

I ran start.bat and this was outputted:

2022-04-03 11:47:56.526 | INFO     | __main__:load_image:121 - Converted to rgba
2022-04-03 11:47:56.527 | INFO     | __main__:load_image:124 - Loaded image size: (48, 34)
2022-04-03 11:47:57.900 | ERROR    | __main__:task:538 - Authorization failed!
NoneType: None
2022-04-03 11:47:59.860 | ERROR    | __main__:task:538 - Authorization failed!
NoneType: None

I looked through main.py, and found that this error comes from an invalid password. However, I double-checked all the usernames and passwords and they are correct. What is causing this error?

KingWifi avatar Apr 03 '22 15:04 KingWifi

Invalid username?

thedankeststorm avatar Apr 03 '22 16:04 thedankeststorm

@thedankeststorm the usernames and passwords are correct

KingWifi avatar Apr 03 '22 16:04 KingWifi

I tried with 3 different accounts and still have the same auth problem.

TomasAMolinari avatar Apr 03 '22 18:04 TomasAMolinari

If you have main.py open could you look for that line, then replace the logger with the following:

      if r.status_code != HTTPStatus.OK.value:
          # password is probably invalid
          logger.exception("Authorization failed! {}", r.status_code)

When you run the script next you should get a status_code that would indicate what is the response from the call.

thoroc avatar Apr 03 '22 20:04 thoroc

The status_code returns a 404. Authorization failed! 404

TomasAMolinari avatar Apr 03 '22 21:04 TomasAMolinari

I was able to fix it, I replaced all the new.reddit.com that I had left in main.py.

TomasAMolinari avatar Apr 03 '22 21:04 TomasAMolinari

What did you replace? By what and where? :)

thoroc avatar Apr 03 '22 21:04 thoroc

The problem was similar to the one mentioned in https://github.com/rdeepak2002/reddit-place-script-2022/issues/291. main.py was using https://new.reddit.com/ and it couldn't connect. I solved it by replacing all the url references in the code with https://reddit.com/. New updates work fine without replacing the url tho.

TomasAMolinari avatar Apr 03 '22 21:04 TomasAMolinari

@TomasAMolinari i am unable to get this working. the problem is, we do not log the problematic username so one could manually check...

test2a avatar Apr 03 '22 23:04 test2a