Datasets:

Languages:
English
ArXiv:
License:

urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:1123)>

#22
by limingcv - opened

Hi, I tried to download the Objaverse dataset but got stuck at the 1407th object, could you give me some advice?

Here is my code:

import objaverse
import multiprocessing


uids = objaverse.load_uids()
processes = multiprocessing.cpu_count()

objects = objaverse.load_objects(
    uids=uids,
    download_processes=processes
)

lvis_annotations = objaverse.load_lvis_annotations()

Then when I downloaded a part of the files, it occurred these error:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/home/tiger/.local/lib/python3.9/site-packages/objaverse/__init__.py", line 106, in _download_object
    urllib.request.urlretrieve(hf_url, tmp_local_path)
Downloaded 785 / 798759 objects
  File "/usr/lib/python3.9/urllib/request.py", line 239, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 555, in error
    result = self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 747, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/usr/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.9/urllib/request.py", line 1349, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:1123)>
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tiger/download_objvarse.py", line 9, in <module>
    objects = objaverse.load_objects(
  File "/home/tiger/.local/lib/python3.9/site-packages/objaverse/__init__.py", line 185, in load_objects
    r = pool.starmap(_download_object, args)
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 372, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:1123)>
limingcv changed discussion title from Downloading stuck at 1406 / 798759 objects to urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:1123)>

i also get the same error. How do you solve it?

Sign up or log in to comment