Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python requests.get在Linux下导致104错误,但在Windows下可以正常运行_Python_Https_Python Requests_Http Error_Urllib3 - Fatal编程技术网

Python requests.get在Linux下导致104错误,但在Windows下可以正常运行

Python requests.get在Linux下导致104错误,但在Windows下可以正常运行,python,https,python-requests,http-error,urllib3,Python,Https,Python Requests,Http Error,Urllib3,我有一个python脚本,可以登录到一个网站并抓取几页 在我编写脚本的Windows机器上运行良好,但在我计划运行脚本的Linux机器上,我收到了requests.exceptions.ConnectionError:('Connection aborted',error(104,'Connection reset by peer')) Linux机器可以很好地处理http请求,但当我试图通过https打开登录页面时,它就崩溃了 我遵循了这里的示例,发现尽管我在Windows下调试了整个过程,但

我有一个python脚本,可以登录到一个网站并抓取几页

在我编写脚本的Windows机器上运行良好,但在我计划运行脚本的Linux机器上,我收到了
requests.exceptions.ConnectionError:('Connection aborted',error(104,'Connection reset by peer'))

Linux机器可以很好地处理http请求,但当我试图通过https打开登录页面时,它就崩溃了

我遵循了这里的示例,发现尽管我在Windows下调试了整个过程,但Linux机器只报告第一行
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection(1):www.example.com
,然后我得到了错误

我已经剥离了所有内容,但在Linux上仍然存在一个简单的错误:

import requests
requests.get('https://www.example.com/Login')
这两台机器运行的是运行在Windows 8和CentOS上的相同版本的python


提前感谢您的帮助

您是否支持代理?很抱歉,我有一段时间没有登录。没有代理,两台计算机位于同一网络上。