Traceback (most recent call last):
File "D:\Python3\lib\urllib\request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "D:\Python3\lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\Python3\lib\http\client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\Python3\lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\Python3\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "D:\Python3\lib\http\client.py", line 964, in send
self.connect()
File "D:\Python3\lib\http\client.py", line 1392, in connect
super().connect()
File "D:\Python3\lib\http\client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "D:\Python3\lib\socket.py", line 724, in create_connection
raise err
File "D:\Python3\lib\socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
老师,这问题我是暂时无头绪,网上说是被拦截或是端口有问题。