简体   繁体   English

我正在尝试使用显示 URLError 的 seaborn 加载数据集: <urlopen error [winerror 10060]< div><div id="text_translate"><p> df = sns.load_dataset("提示")</p><p> 我正在尝试使用显示 URLError 的 seaborn 加载数据集:</p><p> 几秒钟后抛出此错误</p><pre>TimeoutError Traceback (most recent call last) File ~\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:1348, in AbstractHTTPHandler.do_open(self, http_class, req, **http_conn_args) 1347 try: -> 1348 h.request(req.get_method(), req.selector, req.data, headers, 1349 encode_chunked=req.has_header('Transfer-encoding')) 1350 except OSError as err: # timeout error File ~\AppData\Local\Programs\Python\Python311\Lib\http\client.py:1282, in HTTPConnection.request(self, method, url, body, headers, encode_chunked) 1281 """Send a complete request to the server.""" -> 1282 self._send_request(method, url, body, headers, encode_chunked) File ~\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:241, in urlretrieve(url, filename, reporthook, data) 224 """ 225 Retrieve a URL into a temporary location on disk. 226 (...) 237 data file as well as the resulting HTTPMessage object. 238 """ 239 url_type, path = _splittype(url) --> 241 with contextlib.closing(urlopen(url, data)) as fp: 242 headers = fp.info() 244 # Just return the local path and the "headers" for file:// 245 # URLs. No sense in performing a copy unless requested. URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond></pre><p> 我尝试更改 inte.net 连接,还尝试取消选中 LAN 设置中的代理服务器</p></div></urlopen>

[英]I am trying to load dataset using seaborn showing URLError: <urlopen error [WinError 10060]

df = sns.load_dataset("tips") df = sns.load_dataset("提示")

I am trying to load dataset using seaborn showing URLError:我正在尝试使用显示 URLError 的 seaborn 加载数据集:

throws this error after a few seconds几秒钟后抛出此错误

TimeoutError                              Traceback (most recent call last)
File ~\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:1348, in AbstractHTTPHandler.do_open(self, http_class, req, **http_conn_args)
   1347 try:
-> 1348     h.request(req.get_method(), req.selector, req.data, headers,
   1349               encode_chunked=req.has_header('Transfer-encoding'))
   1350 except OSError as err: # timeout error

File ~\AppData\Local\Programs\Python\Python311\Lib\http\client.py:1282, in HTTPConnection.request(self, method, url, body, headers, encode_chunked)
   1281 """Send a complete request to the server."""
-> 1282 self._send_request(method, url, body, headers, encode_chunked)



File ~\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py:241, in urlretrieve(url, filename, reporthook, data)
    224 """
    225 Retrieve a URL into a temporary location on disk.
    226 
   (...)
    237 data file as well as the resulting HTTPMessage object.
    238 """
    239 url_type, path = _splittype(url)
--> 241 with contextlib.closing(urlopen(url, data)) as fp:
    242     headers = fp.info()
    244     # Just return the local path and the "headers" for file://
    245     # URLs. No sense in performing a copy unless requested.



URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>

​

I tried changing the inte.net connection and also tried unchecking the proxy server in LAN settings我尝试更改 inte.net 连接,还尝试取消选中 LAN 设置中的代理服务器

The error 10060 means you cannot connect to the remote place.错误 10060 表示您无法连接到远程位置。 There might be several reasons of such an error:出现这种错误可能有多种原因:

  • Not installed module.未安装模块。 Then try pip install seaborn .然后尝试pip install seaborn
  • Problems with certificates.证书问题。 Please, see this post on Stackoverflow to get more details.请参阅 Stackoverflow 上的这篇文章以获取更多详细信息。
  • It might be because of the.network's problems or your setting issues, such as proxy setting.可能是.network的问题,也可能是你的设置问题,比如代理设置。 To solve the issue, check this post as well.要解决此问题,请同时查看此帖子

Python:网址错误: <urlopen error [errno 10060]< div><div id="text_translate"><p> <strong>操作系统:Windows 7;</strong> <strong>Python 2.7.3 使用 Python GUI Shell</strong></p><p> 我正在尝试通过 Python 阅读一个网站,并且有几个作者使用urllib和urllib2库。 为了将站点存储在变量中,我看到了一种类似的方法:</p><pre> import urllib import urllib2 g = "http://www.google.com/" read = urllib2.urlopen(g)</pre><p> 最后一行在 120 多秒后生成错误:</p><pre> > Traceback (most recent call last): File "<pyshell#27>", line 1, in > <module> > r = urllib2.urlopen(o) File "C:\Python27\lib\urllib2.py", line 126, in urlopen > return _opener.open(url, data, timeout) File "C:\Python27\lib\urllib2.py", line 400, in open > response = self._open(req, data) File "C:\Python27\lib\urllib2.py", line 418, in _open > '_open', req) File "C:\Python27\lib\urllib2.py", line 378, in _call_chain > result = func(*args) File "C:\Python27\lib\urllib2.py", line 1207, in http_open > return self.do_open(httplib.HTTPConnection, req) File "C:\Python27\lib\urllib2.py", line 1177, in do_open > raise URLError(err) URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly > respond after a period of time, or established connection failed > because connected host has failed to respond></pre><p> 我尝试绕过g变量并尝试urlopen("http://www.google.com/")也没有成功(它在相同的时间长度后生成相同的错误)。</p></div></urlopen> - Python: URLError: <urlopen error [Errno 10060]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 urllib.error.URLError: - urllib.error.URLError: <urlopen error [WinError 10060] using urllib.request.urlretrieve() on Windows 10 with Python3 Python:网址错误: <urlopen error [errno 10060]< div><div id="text_translate"><p> <strong>操作系统:Windows 7;</strong> <strong>Python 2.7.3 使用 Python GUI Shell</strong></p><p> 我正在尝试通过 Python 阅读一个网站,并且有几个作者使用urllib和urllib2库。 为了将站点存储在变量中,我看到了一种类似的方法:</p><pre> import urllib import urllib2 g = "http://www.google.com/" read = urllib2.urlopen(g)</pre><p> 最后一行在 120 多秒后生成错误:</p><pre> > Traceback (most recent call last): File "<pyshell#27>", line 1, in > <module> > r = urllib2.urlopen(o) File "C:\Python27\lib\urllib2.py", line 126, in urlopen > return _opener.open(url, data, timeout) File "C:\Python27\lib\urllib2.py", line 400, in open > response = self._open(req, data) File "C:\Python27\lib\urllib2.py", line 418, in _open > '_open', req) File "C:\Python27\lib\urllib2.py", line 378, in _call_chain > result = func(*args) File "C:\Python27\lib\urllib2.py", line 1207, in http_open > return self.do_open(httplib.HTTPConnection, req) File "C:\Python27\lib\urllib2.py", line 1177, in do_open > raise URLError(err) URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly > respond after a period of time, or established connection failed > because connected host has failed to respond></pre><p> 我尝试绕过g变量并尝试urlopen("http://www.google.com/")也没有成功(它在相同的时间长度后生成相同的错误)。</p></div></urlopen> - Python: URLError: <urlopen error [Errno 10060] 如何克服urlopen错误[WinError 10060]问题? - How to overcome urlopen error [WinError 10060] issue? 一个独特的URLError: <urlopen error timed out> 我得到的错误 - A unique URLError: <urlopen error timed out> Error I am getting Python:urllib2.URLError: - Python: urllib2.URLError: <urlopen error [Errno 10060] Python: urllib.error.URLError:<urlopen error [WinError 3] The system cannot find the path specified: ' '> - Python: urllib.error.URLError: <urlopen error [WinError 3] The system cannot find the path specified: ' '> 为什么通过 smtplib 发送 email 时出现超时 [WinError 10060] 错误? - Why am I getting a timeout [WinError 10060] error when sending an email via smtplib? WinError 10060 尝试使用 Python PySFTP 模块连接到远程服务器时出错 - WinError 10060 Error when trying to connect to remote server using Python PySFTP module URLError: urlopen 错误超时 - URLError: urlopen error timed out python urlopen 错误 [Errno 10060] - python urlopen error [Errno 10060]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM