I have a problem with these client and server codes, I keep getting the [Errno 10061] No connection could be made because the target machine actively refused it
When you run the code on windows machine, firewall prompts it to allow network access, allow the network access and it will work, if it does not prompts, go to firewall settings > allow an app through firewall and select your python.exe and allow network access.
I had errors 10060 and 10061. The reason was in my antivirus(Eset Nod 32). Try to turn off the Firewall of your antivirus as I did or just delete it for a time to test the program. If everything started to work properly, add that program to the exclusion or switch to another antivirus. Also, try to change the 'host' variable to an empty string:
host = ''
And add socket.AF_INET, socket.SOCK_STREAM to the 's' variable:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)