简体   繁体   English

Jupyter Notebook:[WinError 10060] 连接尝试失败,因为连接方在一段时间后没有正确响应

[英]Jupyter Notebook: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time

I'm trying to run the following code in jupyter Notebooks我正在尝试在 jupyter Notebooks 中运行以下代码

from sklearn.datasets import fetch_mldata
mnist = fetch_mldata('MNIST original')

and getting the following error并得到以下错误

TimeoutError                              Traceback (most recent call last)
~\Anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
   1316                 h.request(req.get_method(), req.selector, req.data, headers,
-> 1317                           encode_chunked=req.has_header('Transfer-encoding'))
   1318             except OSError as err: # timeout error 

~\Anaconda3\lib\http\client.py in request(self, method, url, body, headers, encode_chunked)
   1243         """Send a complete request to the server."""
-> 1244         self._send_request(method, url, body, headers, encode_chunked)
   1245 

~\Anaconda3\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked)
   1289             body = _encode(body, 'body')
-> 1290         self.endheaders(body, encode_chunked=encode_chunked)
   1291 

~\Anaconda3\lib\http\client.py in endheaders(self, message_body, encode_chunked)
   1238             raise CannotSendHeader()
-> 1239         self._send_output(message_body, encode_chunked=encode_chunked)
   1240 

~\Anaconda3\lib\http\client.py in _send_output(self, message_body, encode_chunked)
   1025         del self._buffer[:]
-> 1026         self.send(msg)
   1027 

~\Anaconda3\lib\http\client.py in send(self, data)
    965             if self.auto_open:
--> 966                 self.connect()
    967             else:

~\Anaconda3\lib\http\client.py in connect(self)
    937         self.sock = self._create_connection(
--> 938             (self.host,self.port), self.timeout, self.source_address)
    939         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

~\Anaconda3\lib\socket.py in create_connection(address, timeout, source_address)
    726     if err is not None:
--> 727         raise err
    728     else:

~\Anaconda3\lib\socket.py in create_connection(address, timeout, source_address)
    715                 sock.bind(source_address)
--> 716             sock.connect(sa)
    717             # Break explicitly a reference cycle

TimeoutError: [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'm on a windows 10 machine with Anaconda {version: '4.7.12'}, python {version: '3.7.4'}我在一台 windows 10 机器上使用 Anaconda {版本:'4.7.12'},python {版本:'3.7.4'}

Is this related to HTTP Proxy?这与 HTTP 代理有关吗? I'm not sure how to configure it with jupyter notebooks.我不确定如何使用 jupyter 笔记本对其进行配置。 Please help.请帮忙。

Looks like you're not alone.看来你并不孤单。 I'm getting a time out error too.我也遇到超时错误。 I'm not using a proxy or jupyter so it probably is just that the source is down.我没有使用代理或 jupyter,所以可能只是源已关闭。

>>> from sklearn.datasets import fetch_mldata
>>> mnist = fetch_mldata('MNIST original')
...
TimeoutError: [Errno 60] Operation timed out

Based on the discussion at https://github.com/scikit-learn/scikit-learn/issues/8588 , it looks like this is a wider spread problem.根据https://github.com/scikit-learn/scikit-learn/issues/8588上的讨论,看起来这是一个更广泛的问题。

The following source works for me though.以下来源对我有用。

>>> from sklearn.datasets import fetch_openml
>>> mnist = fetch_openml('mnist_784')

暂无
暂无

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

相关问题 TimeoutError: [WinError 10060] 连接尝试失败,因为连接方在一段时间后没有正确响应或### - TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time or### 连接错误:连接尝试失败,因为连接方在一段时间后没有正确响应 - Connection Error: A connection attempt failed because the connected party did not properly respond after a period of time TimeoutError: [WinError 10060] 连接尝试失败 - TimeoutError: [WinError 10060] A connection attempt failed 无法建立新连接:[WinError 10060] 连接尝试失败 - Failed to establish a new connection: [WinError 10060] A connection attempt failed 通过Django发送电子邮件 - WinError 10060连接尝试失败,GetAddrInfo错误 - Sending Emails through Django - WinError 10060 A connection attempt failed and GetAddrInfo Error TimeoutError:[WinError 10060] 连接尝试失败:除了块也不执行 - TimeoutError: [WinError 10060] A connection attempt failed : Except block doesn't execute either GCE 上的 Python:连接失败,因为连接的主机未能响应 - Python on GCE: connection failed because connected host has failed to respond 连接失败! 在 jupyter 笔记本中 - connection failed! in jupyter notebook 如何修复:连接被拒绝错误 WinError 10061 - 在 PySpark/jupyter 笔记本上 - How to fix: Connection Refused Error WinError 10061 - On PySpark/jupyter notebook Anaconda jupyter notebook“连接失败”错误 - Anaconda jupyter notebook "connection failed" error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM