kaggle中下载数据遇到了下列问题,能解决吗
C:\Users\chen>kaggle datasets download -d mohnishsaiprasad/forest-fire-images
2024-03-07 11:01:17,638 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))': /kaggle-data-sets/1770494/2890158/bundle/archive.zip?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20240307%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240307T030116Z&X-Goog-Expires=259200&X-Goog-SignedHeaders=host&X-Goog-Signature=35f8291b12b42557f029611f7dad0a9b69522637684f68288ff63e2c78cbf5bf52fd98c681c2c2ae47c9f60c109827eac0f8a11d89c065b9bafb01a9dd075dbd0709ee3068214f96f9b0467b601998cdc531a3e2222152703b47306a27efb04614d0f03759e9719c5050ec0a7930c59062e0dbe35f1ddacd65f48a861662bc82c93d78593be09c96c1e2c1cb83eabca0501205a416442dba225387a08ef7c8d75231161c3a96d543451cd09eb92848d67b10c54118aefbc9f8860e926d0b591619762953c63b6bd295c6570dc437c4b02c8c80c59431c01095bf05013efaf849c443cd1bc77d7295dcee3a9cd19ad81a4fbef45e71aa7ad99d56e70e91cde184
2024-03-07 11:01:17,764 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))': /kaggle-data-sets/1770494/2890158/bundle/archive.zip?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20240307%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240307T030116Z&X-Goog-Expires=259200&X-Goog-SignedHeaders=host&X-Goog-Signature=35f8291b12b42557f029611f7dad0a9b69522637684f68288ff63e2c78cbf5bf52fd98c681c2c2ae47c9f60c109827eac0f8a11d89c065b9bafb01a9dd075dbd0709ee3068214f96f9b0467b601998cdc531a3e2222152703b47306a27efb04614d0f03759e9719c5050ec0a7930c59062e0dbe35f1ddacd65f48a861662bc82c93d78593be09c96c1e2c1cb83eabca0501205a416442dba225387a08ef7c8d75231161c3a96d543451cd09eb92848d67b10c54118aefbc9f8860e926d0b591619762953c63b6bd295c6570dc437c4b02c8c80c59431c01095bf05013efaf849c443cd1bc77d7295dcee3a9cd19ad81a4fbef45e71aa7ad99d56e70e91cde184
Traceback (most recent call last):
File "D:\software\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "D:\software\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "D:\software\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "D:\software\Anaconda3\lib\site-packages\urllib3\connection.py", line 414, in connect
self.sock = ssl_wrap_socket(
File "D:\software\Anaconda3\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "D:\software\Anaconda3\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "D:\software\Anaconda3\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "D:\software\Anaconda3\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "D:\software\Anaconda3\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: 远程主机强迫关闭了一个现有的连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\software\Anaconda3\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\software\Anaconda3\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\software\Anaconda3\Scripts\kaggle.exe\__main__.py", line 7, in <module>
File "D:\software\Anaconda3\lib\site-packages\kaggle\cli.py", line 70, in main
out = args.func(**command_args)
File "D:\software\Anaconda3\lib\site-packages\kaggle\api\kaggle_api_extended.py", line 1493, in dataset_download_cli
self.dataset_download_files(dataset,
File "D:\software\Anaconda3\lib\site-packages\kaggle\api\kaggle_api_extended.py", line 1439, in dataset_download_files
self.datasets_download_with_http_info(
File "D:\software\Anaconda3\lib\site-packages\kaggle\api\kaggle_api.py", line 1563, in datasets_download_with_http_info
return self.api_client.call_api(
File "D:\software\Anaconda3\lib\site-packages\kaggle\api_client.py", line 329, in call_api
return self.__call_api(resource_path, method,
File "D:\software\Anaconda3\lib\site-packages\kaggle\api_client.py", line 161, in __call_api
response_data = self.request(
File "D:\software\Anaconda3\lib\site-packages\kaggle\api_client.py", line 351, in request
return self.rest_client.GET(url,
File "D:\software\Anaconda3\lib\site-packages\kaggle\rest.py", line 247, in GET
return self.request("GET", url,
File "D:\software\Anaconda3\lib\site-packages\kaggle\rest.py", line 220, in request
r = self.pool_manager.request(method, url,
File "D:\software\Anaconda3\lib\site-packages\urllib3\request.py", line 74, in request
return self.request_encode_url(
File "D:\software\Anaconda3\lib\site-packages\urllib3\request.py", line 96, in request_encode_url
return self.urlopen(method, url, **extra_kw)
File "D:\software\Anaconda3\lib\site-packages\urllib3\poolmanager.py", line 418, in urlopen
return self.urlopen(method, redirect_location, **kw)
File "D:\software\Anaconda3\lib\site-packages\urllib3\poolmanager.py", line 376, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "D:\software\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 815, in urlopen
return self.urlopen(
File "D:\software\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 815, in urlopen
return self.urlopen(
File "D:\software\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "D:\software\Anaconda3\lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /kaggle-data-sets/1770494/2890158/bundle/archive.zip?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20240307%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240307T030116Z&X-Goog-Expires=259200&X-Goog-SignedHeaders=host&X-Goog-Signature=35f8291b12b42557f029611f7dad0a9b69522637684f68288ff63e2c78cbf5bf52fd98c681c2c2ae47c9f60c109827eac0f8a11d89c065b9bafb01a9dd075dbd0709ee3068214f96f9b0467b601998cdc531a3e2222152703b47306a27efb04614d0f03759e9719c5050ec0a7930c59062e0dbe35f1ddacd65f48a861662bc82c93d78593be09c96c1e2c1cb83eabca0501205a416442dba225387a08ef7c8d75231161c3a96d543451cd09eb92848d67b10c54118aefbc9f8860e926d0b591619762953c63b6bd295c6570dc437c4b02c8c80c59431c01095bf05013efaf849c443cd1bc77d7295dcee3a9cd19ad81a4fbef45e71aa7ad99d56e70e91cde184 (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))) 这个错误通常是因为下载数据时与Kaggle服务器的连接中断导致的。有几种解决方法可以尝试:
1. 重试:您可以尝试重新运行相同的命令,看看是否能够成功下载数据。有时候这个错误只是暂时的网络问题,重试可能会成功。
2. 使用代理:如果您在使用代理服务器进行网络连接,可能会出现连接中断的问题。您可以尝试取消使用代理或者更换一个稳定的代理服务器。
3. 使用信任的网络连接:某些网络环境可能会限制对特定网站的访问,尤其是对于非标准端口的访问。您可以尝试在一个信任的网络环境中重试下载,比如在家里或者在办公室。
4. 使用其他下载方式:如果您尝试了上述方法仍然无法解决问题,您可以考虑直接从Kaggle网站上手动下载数据集。在浏览器中访问https://www.kaggle.com/mohnishsaiprasad/forest-fire-images并点击"Download"按钮即可。
希望这些方法能够帮助您成功下载数据集!祝您好运!
以上回复来自 FishC AI 小助理,如未能正确解答您的问题,请继续追问。 FishC 发表于 2024-3-7 11:03
这个错误通常是因为下载数据时与Kaggle服务器的连接中断导致的。有几种解决方法可以尝试:
1. 重试:您 ...
直接下载就是SSL_connect error 5
jupyter中
用:
import opendatasets as od
od.download("https://www.kaggle.com/datasets/phylake1337/fire-dataset/download?datasetVersionNumber=1")
也是:
2024-03-07 11:32:21,378 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))': /kaggle-data-sets/529007/969357/bundle/archive.zip?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20240307%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240307T033220Z&X-Goog-Expires=259200&X-Goog-SignedHeaders=host&X-Goog-Signature=00d52465c27052c39519135e202b9a93e25f336100a2ffbb7e74918d049aea95f70452e32c2fde51353a5197d82dfe8d560155100f019493202a9c224b8a8df2b7852fa4aa2c9f46fe7f8df3af0e7c5b7c6db2b25e7ec83e0be0248dfe620a6c85ced0fcf211a718d6962dd7b4b575136aa7aafeb834bf4d1627856e6eb7f5c157ba9831c9ec159045772d8abcc8ac43dadca27f4625d1c72327ef1f008d57570818e9321686aca7e2ad6e19b5272be4aa01ad834aa18504a5952bc2cb5ddc53197b916feb6daba140b5084a40cc8dab0ba12df97acd3a9aee276829c19002cde4317b072c019f33aa60ee431176b8f3db889767c3d72a62afbaeaba20ab5603
2024-03-07 11:32:21,599 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))': /kaggle-data-sets/529007/969357/bundle/archive.zip?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20240307%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240307T033220Z&X-Goog-Expires=259200&X-Goog-SignedHeaders=host&X-Goog-Signature=00d52465c27052c39519135e202b9a93e25f336100a2ffbb7e74918d049aea95f70452e32c2fde51353a5197d82dfe8d560155100f019493202a9c224b8a8df2b7852fa4aa2c9f46fe7f8df3af0e7c5b7c6db2b25e7ec83e0be0248dfe620a6c85ced0fcf211a718d6962dd7b4b575136aa7aafeb834bf4d1627856e6eb7f5c157ba9831c9ec159045772d8abcc8ac43dadca27f4625d1c72327ef1f008d57570818e9321686aca7e2ad6e19b5272be4aa01ad834aa18504a5952bc2cb5ddc53197b916feb6daba140b5084a40cc8dab0ba12df97acd3a9aee276829c19002cde4317b072c019f33aa60ee431176b8f3db889767c3d72a62afbaeaba20ab5603 天陈陌临 发表于 2024-03-07 11:54
直接下载就是SSL_connect error 5
jupyter中
用:
...
看起来您的问题可能是由于网络连接不稳定导致的。这种情况下,建议您尝试以下解决方法:
1. 使用 VPN:某些网络环境可能会限制对某些网站的访问。您可以尝试使用一个虚拟专用网络(VPN)来绕过这些限制,并尝试重新下载数据。
2. 更改下载源:Kaggle提供了多个下载源,您可以尝试更改下载源以获取更好的连接质量。您可以在`opendatasets`中使用`od.downloader.set_download_source("URL")`指定您想要的下载源。
3. 物理位置:如果您连接到的网络存在地理限制,您可以尝试切换至另一个网络或者访问更远离该限制的网络。
4. 逐步下载:如果下载整个数据集时出现问题,您可以尝试逐步下载数据集的部分内容。可以通过指定下载数据的文件夹路径来实现,例如:
import opendatasets as od
od.download("https://www.kaggle.com/datasets/phylake1337/fire-dataset/download?datasetVersionNumber=1", data_dir="./datasets/fire-dataset")
5. 手动下载:尝试手动从Kaggle网站上下载数据集。您可以在浏览器中打开 https://www.kaggle.com/datasets/phylake1337/fire-dataset/download?datasetVersionNumber=1 并点击"Download"按钮下载数据集。
希望这些方法能够帮助您成功下载数据集!祝您好运!
以上回复来自 FishC AI 小助理,如未能正确解答您的问题,请继续追问。 1
加油 加油 1
页:
[1]