ConnectionResetError:下载mscoco数据集时出现[WinError 10054]

时间:2019-05-09 04:10:15

标签: python-3.x

我正在尝试根据链接中给出的教程为mscoco数据集实现mask-rcnn

https://gluon-cv.mxnet.io/build/examples_instance/train_mask_rcnn_coco.html

要下载数据集,他们要求遵循以下链接中给出的说明。

https://gluon-cv.mxnet.io/build/examples_datasets/mscoco.html#sphx-glr-build-examples-datasets-mscoco-py

在执行mscoco.py文件时,出现以下错误

C:\Users\yy\OneDrive - pusan.ac.kr\datasets>python mscoco.py
Downloading C:\Users\yy/mscoco/train2017.zip from http://images.cocodataset.org/zips/train2017.zip...
 14%|██████████████████████▌                                                                                                                                        | 2683913/18883654 [22:33<5:40:49, 792.16KB/s]Traceback (most recent call last): 

File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\response.py", line 302, in _error_catcher
    yield
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\response.py", line 384, in read
    data = self._fp.read(amt)
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 449, in read
    n = self.readinto(b)
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 493, in readinto
    n = self.fp.readinto(b)
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\socket.py", line 586, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\models.py", line 745, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\response.py", line 436, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\response.py", line 401, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\urllib3\response.py", line 320, in _error_catcher
    raise ProtocolError('Connection broken: %r' % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)", ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "mscoco.py", line 53, in <module>
    download_coco(path, overwrite=args.overwrite)
  File "mscoco.py", line 38, in download_coco
    filename = download(url, path=path, overwrite=overwrite, sha1_hash=checksum)
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\gluoncv\utils\download.py", line 79, in download
    unit='KB', unit_scale=False, dynamic_ncols=True):
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\tqdm\_tqdm.py", line 1022, in __iter__
    for obj in iterable:
  File "C:\Users\yy\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\models.py", line 748, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)", ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

该页面上提供的源代码是否进行了任何更改?谁能帮我吗?

0 个答案:

没有答案