Errno 10061 : No connection could be made because the target machine actively refused it ( client - server )

后端 未结 14 723
無奈伤痛
無奈伤痛 2020-11-28 11:11

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

14条回答
  •  误落风尘
    2020-11-28 11:20

    This could be because of proxy or firewall. If it's proxy, then you need to specify proxy setting at entry point of your code or project.

    import os #for proxy
    
    proxy = 'http://10.XX.XX.XX:8X8X' #your own proxy 'http://:@:'
    
    os.environ['http_proxy'] = proxy 
    os.environ['HTTP_PROXY'] = proxy
    os.environ['https_proxy'] = proxy
    os.environ['HTTPS_PROXY'] = proxy
    #rest of code .....
    

提交回复
热议问题