Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions #12

Open
CuriouslyInventing opened this issue Dec 4, 2024 · 5 comments

Comments

@CuriouslyInventing
Copy link

PS C:\Users\Curio\Downloads\RedditArchiver-standalone-2.0.2> py authentication.py
Client ID: ####CLIENT ID#####
Client secret: ####SECRET#####

Now open this url in your browser:

https://www.reddit.com/api/v1/authorize?client_id=uUk5KA-S-56EPh-7MhuFVw&duration=permanent&redirect_uri=http%3A%2F%2Flocalhost%3A8080&response_type=code&scope=read+history+identity&state=50433

Traceback (most recent call last):
File "C:\Users\Curio\Downloads\RedditArchiver-standalone-2.0.2\authentication.py", line 69, in
sys.exit(main())
^^^^^^
File "C:\Users\Curio\Downloads\RedditArchiver-standalone-2.0.2\authentication.py", line 24, in main
client = receive_connection()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Curio\Downloads\RedditArchiver-standalone-2.0.2\authentication.py", line 54, in receive_connection
server.bind(("localhost", 8080))
PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

@CuriouslyInventing
Copy link
Author

As you can see, I just have problems getting the authentication token. I was super excited about this come. I really think the SAP has a lot of potential and I plan to use it aggressively. Thank you so much for taking the time to develop something like this. That's really cool. Period. Now if only if II could get it to work...

@Ailothaen
Copy link
Owner

Hello,

It might be because the port 8080 is already used on your machine.

Could you try replacing 8080, both in server.bind(("localhost", 8080)) in authentication.py and in the Reddit app configuration by another number (let's say 17603), and run again authentication.py see if it works?

@CuriouslyInventing
Copy link
Author

Interesting, that's resolved, but this is what I have. NO auth token generated. worked fine on 8080 this time around fyi
autherrro

@CuriouslyInventing
Copy link
Author

Hey @Ailothaen, are you around :)
Sorry, this is the best tool I've come across and I'd love for it to work.

THANK YOU

@Ailothaen
Copy link
Owner

Ailothaen commented Dec 11, 2024

I tried to troubleshoot this issue, but I am not able to reproduce it on my side.

Normally, on the final web page, you should see a message like

Refresh token: 1111111111111-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Can you try to replace all the "8080" in the file authentication.py and the Reddit app configuration, by something else, for example "8099", and also check that:

  • you are using Python 3 and not Python 2 (use py -3 instead of python or py on Windows to be sure)
  • you correctly copy/pasted client id and client secret
  • you used the "script" authentication type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants