Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionError of osf clone #175

Open
weir12 opened this issue Apr 7, 2020 · 7 comments
Open

ConnectionError of osf clone #175

weir12 opened this issue Apr 7, 2020 · 7 comments

Comments

@weir12
Copy link

weir12 commented Apr 7, 2020

Hi:
When I tried to clone an large size public project.
The following error occurred with the opportunity:

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

How do I continue to download the file from the disconnected part instead of redownloading the entire project?
thanks

@weir12
Copy link
Author

weir12 commented Apr 7, 2020

Complete error record

Traceback (most recent call last):
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/home/weir/anaconda3/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/home/weir/anaconda3/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/home/weir/anaconda3/lib/python3.7/http/client.py", line 267, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/home/weir/anaconda3/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 318, in recv_into
    raise SocketError(str(e))
OSError: (104, 'ECONNRESET')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/weir/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py", line 400, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "/home/weir/anaconda3/lib/python3.7/http/client.py", line 1344, in getresponse
    response.begin()
  File "/home/weir/anaconda3/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/home/weir/anaconda3/lib/python3.7/http/client.py", line 267, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/home/weir/anaconda3/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 318, in recv_into
    raise SocketError(str(e))
urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError("(104, 'ECONNRESET')"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/weir/anaconda3/bin/osf", line 8, in <module>
    sys.exit(main())
  File "/home/weir/anaconda3/lib/python3.7/site-packages/osfclient/__main__.py", line 104, in main
    exit_code = args.func(args)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/osfclient/cli.py", line 91, in wrapper
    return_value = f(cli_args)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/osfclient/cli.py", line 167, in clone    file_.write_to(f)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/osfclient/models/file.py", line 53, in write_to
    response = self._get(self._download_url, stream=True)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/osfclient/models/core.py", line 23, in _get
    return self.session.get(url, *args, **kwargs)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/osfclient/models/session.py", line 44, in get
    response = super(OSFSession, self).get(url, *args, **kwargs)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/weir/anaconda3/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError("(104, 'ECONNRESET')"))

@felliott
Copy link
Collaborator

Hey @weir12,

When you say a "large project", do you mean a project containing a large file or a project containing many small/medium-sized files? And could you you give me an order-of-magnitude estimate on the file size or number of files? Thanks!

Cheers,
@felliott

@hcp4715
Copy link

hcp4715 commented Feb 13, 2021

I encountered the same error as @weir12 did.
This error occur when I was trying to download from a fMRI/EEG dataset, which include a large number of files, and some files are also large.
I then tried to osf list, and had the same error.

@ethanwhite
Copy link
Collaborator

This error occurs consistently when trying to clone https://osf.io/3cwf9/, which also can't be successfully downloaded as a zip

@ethanwhite
Copy link
Collaborator

How do I continue to download the file from the disconnected part instead of redownloading the entire project?
thanks

For anyone else who ends up here, you can skip redownloading existing files using the --update flag:

osf clone --update

@girlsending0
Copy link

Have you ever solved this problem?

@sainathmurali
Copy link

How do I continue to download the file from the disconnected part instead of redownloading the entire project?
thanks

For anyone else who ends up here, you can skip redownloading existing files using the --update flag:

osf clone --update

This is also not working for me. It again downloads all the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants