Avatar ·

OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions, how to fix the error?

📁 method, string, Advanced Python Topics

Tell me, what is the problem? I need the program to start on any system without errors and without Firewall and antivirus

connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.connect(("10.0.2.15", 12345))

It finds the problem in these lines, I already tried different ports, it doesn't help, antivirus is disabled, firewall is also disabled

Traceback (most recent call last):
  File "sockettest.py", line 10, in <module>
    connection.connect(("10.0.2.15", 12345))