Last answered:

28 Jul 2022

Posted on:

22 Jun 2022

0

I can't successfully download the mnist_dataset.

This is what I got after I submitted my code.


Downloading and preparing dataset Unknown size (download: Unknown size, generated: Unknown size, total: Unknown size) to ~\tensorflow_datasets\mnist\3.0.1...




0/4 [00:11<?, ? url/s]


0/0 [00:11<?, ? MiB/s]


0/0 [00:11<?, ? file/s]



ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.


Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\util\connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "C:\Users\user\Anaconda3\lib\socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connection.py", line 301, in connect
    conn = self._new_conn()
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\adapters.py", line 449, in send
    timeout=timeout
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\util\retry.py", line 399, 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: /cvdf-datasets/mnist/t10k-images-idx3-ubyte.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-3-9860a6ce4f45>", line 10, in <module>
    mnist_dataset, mnist_info = tfds.load(name='mnist', with_info=True, as_supervised=True)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\load.py", line 327, in load
    dbuilder.download_and_prepare(**download_and_prepare_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\dataset_builder.py", line 483, in download_and_prepare
    download_config=download_config,
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\dataset_builder.py", line 1185, in _download_and_prepare
    dl_manager, **optional_pipeline_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\image_classification\mnist.py", line 119, in _split_generators
    {k: urllib.parse.urljoin(self.URL, v) for k, v in filenames.items()})
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\download_manager.py", line 633, in download_and_extract
    return _map_promise(self._download_extract, url_or_urls)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\download_manager.py", line 766, in _map_promise
    res = tf.nest.map_structure(lambda p: p.get(), all_promises)  # Wait promises
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\util\nest.py", line 535, in map_structure
    structure[0], [func(*x) for x in entries],
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\util\nest.py", line 535, in <listcomp>
    structure[0], [func(*x) for x in entries],
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\download_manager.py", line 766, in <lambda>
    res = tf.nest.map_structure(lambda p: p.get(), all_promises)  # Wait promises
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 512, in get
    return self._target_settled_value(_raise=True)
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 516, in _target_settled_value
    return self._target()._settled_value(_raise)
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 226, in _settled_value
    reraise(type(raise_val), raise_val, self._traceback)
  File "C:\Users\user\Anaconda3\lib\site-packages\six.py", line 693, in reraise
    raise value
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 844, in handle_future_result
    resolve(future.result())
  File "C:\Users\user\Anaconda3\lib\concurrent\futures\_base.py", line 428, in result
    return self.__get_result()
  File "C:\Users\user\Anaconda3\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\user\Anaconda3\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\downloader.py", line 217, in _sync_download
    with _open_url(url, verify=verify) as (response, iter_content):
  File "C:\Users\user\Anaconda3\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\downloader.py", line 278, in _open_with_requests
    with session.get(url, stream=True, **kwargs) as response:
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /cvdf-datasets/mnist/t10k-images-idx3-ubyte.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2040, in showtraceback
    stb = value._render_traceback_()
AttributeError: 'ConnectionError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1101, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 319, in wrapped
    return f(*args, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 353, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "C:\Users\user\Anaconda3\lib\inspect.py", line 1502, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
  File "C:\Users\user\Anaconda3\lib\inspect.py", line 1460, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "C:\Users\user\Anaconda3\lib\inspect.py", line 696, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:


  File "C:\Users\user\Anaconda3\lib\inspect.py", line 733, in getmodule
    if ismodule(module) and hasattr(module, '__file__'):
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
    module = self._load()
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "C:\Users\user\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'


ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.


Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\util\connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "C:\Users\user\Anaconda3\lib\socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 839, in _validate_conn
    conn.connect()
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connection.py", line 301, in connect
    conn = self._new_conn()
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\adapters.py", line 449, in send
    timeout=timeout
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Users\user\Anaconda3\lib\site-packages\urllib3\util\retry.py", line 399, 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: /cvdf-datasets/mnist/t10k-images-idx3-ubyte.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-3-9860a6ce4f45>", line 10, in <module>
    mnist_dataset, mnist_info = tfds.load(name='mnist', with_info=True, as_supervised=True)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\load.py", line 327, in load
    dbuilder.download_and_prepare(**download_and_prepare_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\dataset_builder.py", line 483, in download_and_prepare
    download_config=download_config,
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\dataset_builder.py", line 1185, in _download_and_prepare
    dl_manager, **optional_pipeline_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\image_classification\mnist.py", line 119, in _split_generators
    {k: urllib.parse.urljoin(self.URL, v) for k, v in filenames.items()})
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\download_manager.py", line 633, in download_and_extract
    return _map_promise(self._download_extract, url_or_urls)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\download_manager.py", line 766, in _map_promise
    res = tf.nest.map_structure(lambda p: p.get(), all_promises)  # Wait promises
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\util\nest.py", line 535, in map_structure
    structure[0], [func(*x) for x in entries],
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\util\nest.py", line 535, in <listcomp>
    structure[0], [func(*x) for x in entries],
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\download_manager.py", line 766, in <lambda>
    res = tf.nest.map_structure(lambda p: p.get(), all_promises)  # Wait promises
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 512, in get
    return self._target_settled_value(_raise=True)
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 516, in _target_settled_value
    return self._target()._settled_value(_raise)
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 226, in _settled_value
    reraise(type(raise_val), raise_val, self._traceback)
  File "C:\Users\user\Anaconda3\lib\site-packages\six.py", line 693, in reraise
    raise value
  File "C:\Users\user\Anaconda3\lib\site-packages\promise\promise.py", line 844, in handle_future_result
    resolve(future.result())
  File "C:\Users\user\Anaconda3\lib\concurrent\futures\_base.py", line 428, in result
    return self.__get_result()
  File "C:\Users\user\Anaconda3\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\user\Anaconda3\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\downloader.py", line 217, in _sync_download
    with _open_url(url, verify=verify) as (response, iter_content):
  File "C:\Users\user\Anaconda3\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow_datasets\core\download\downloader.py", line 278, in _open_with_requests
    with session.get(url, stream=True, **kwargs) as response:
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\requests\adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /cvdf-datasets/mnist/t10k-images-idx3-ubyte.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2040, in showtraceback
    stb = value._render_traceback_()
AttributeError: 'ConnectionError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3249, in run_ast_nodes
    if (await self.run_code(code, result,  async_=asy)):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
    self.showtraceback(running_compiled_code=True)
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2043, in showtraceback
    value, tb, tb_offset=tb_offset)
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1385, in structured_traceback
    self, etype, value, tb, tb_offset, number_of_lines_of_context)
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1288, in structured_traceback
    self, etype, value, tb, tb_offset, number_of_lines_of_context
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1150, in structured_traceback
    formatted_exceptions += self.prepare_chained_exception_message(evalue.__cause__)


TypeError: can only concatenate str (not "list") to str

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2040, in showtraceback
    stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 1101, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 319, in wrapped
    return f(*args, **kwargs)
  File "C:\Users\user\Anaconda3\lib\site-packages\IPython\core\ultratb.py", line 353, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "C:\Users\user\Anaconda3\lib\inspect.py", line 1502, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
  File "C:\Users\user\Anaconda3\lib\inspect.py", line 1460, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "C:\Users\user\Anaconda3\lib\inspect.py", line 696, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "C:\Users\user\Anaconda3\lib\inspect.py", line 733, in getmodule
    if ismodule(module) and hasattr(module, '__file__'):
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
    module = self._load()
  File "C:\Users\user\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "C:\Users\user\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.estimator'


---------------------------------------------------------------------------
gaierror                                  Traceback (most recent call last)
~\Anaconda3\lib\site-packages\urllib3\connection.py in _new_conn(self)
    158             conn = connection.create_connection(
--> 159                 (self._dns_host, self.port), self.timeout, **extra_kw)
    160 

~\Anaconda3\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options)
     56 
---> 57     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
     58         af, socktype, proto, canonname, sa = res

~\Anaconda3\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags)
    747     addrlist = []
--> 748     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    749         af, socktype, proto, canonname, sa = res

gaierror: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

NewConnectionError                        Traceback (most recent call last)
~\Anaconda3\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    599                                                   body=body, headers=headers,
--> 600                                                   chunked=chunked)
    601 

~\Anaconda3\lib\site-packages\urllib3\connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
    342         try:
--> 343             self._validate_conn(conn)
    344         except (SocketTimeout, BaseSSLError) as e:

~\Anaconda3\lib\site-packages\urllib3\connectionpool.py in _validate_conn(self, conn)
    838         if not getattr(conn, 'sock', None):  # AppEngine might not have  `.sock`
--> 839             conn.connect()
    840 

~\Anaconda3\lib\site-packages\urllib3\connection.py in connect(self)
    300         # Add certificate verification
--> 301         conn = self._new_conn()
    302         hostname = self.host

~\Anaconda3\lib\site-packages\urllib3\connection.py in _new_conn(self)
    167             raise NewConnectionError(
--> 168                 self, "Failed to establish a new connection: %s" % e)
    169 

NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed

During handling of the above exception, another exception occurred:

MaxRetryError                             Traceback (most recent call last)
~\Anaconda3\lib\site-packages\requests\adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
    448                     retries=self.max_retries,
--> 449                     timeout=timeout
    450                 )

~\Anaconda3\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
    637             retries = retries.increment(method, url, error=e, _pool=self,
--> 638                                         _stacktrace=sys.exc_info()[2])
    639             retries.sleep()

~\Anaconda3\lib\site-packages\urllib3\util\retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
    398         if new_retry.is_exhausted():
--> 399             raise MaxRetryError(_pool, url, error or ResponseError(cause))
    400 

MaxRetryError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /cvdf-datasets/mnist/t10k-images-idx3-ubyte.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001F453D14508>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed'))

During handling of the above exception, another exception occurred:


During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
~\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
   2039                         # in the engines. This should return a list of strings.
-> 2040                         stb = value._render_traceback_()
   2041                     except Exception:

AttributeError: 'ConnectionError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
~\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py in run_code(self, code_obj, result, async_)
   3341             if result is not None:
   3342                 result.error_in_exec = sys.exc_info()[1]
-> 3343             self.showtraceback(running_compiled_code=True)
   3344         else:
   3345             outflag = False

~\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
   2041                     except Exception:
   2042                         stb = self.InteractiveTB.structured_traceback(etype,
-> 2043                                             value, tb, tb_offset=tb_offset)
   2044 
   2045                     self._showtraceback(etype, value, stb)

~\Anaconda3\lib\site-packages\IPython\core\ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1383         self.tb = tb
   1384         return FormattedTB.structured_traceback(
-> 1385             self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1386 
   1387 

~\Anaconda3\lib\site-packages\IPython\core\ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
   1286             # Verbose modes need a full traceback
   1287             return VerboseTB.structured_traceback(
-> 1288                 self, etype, value, tb, tb_offset, number_of_lines_of_context
   1289             )
   1290         elif mode == 'Minimal':

~\Anaconda3\lib\site-packages\IPython\core\ultratb.py in structured_traceback(self, etype, evalue, etb, tb_offset, number_of_lines_of_context)
   1148         exception = self.get_parts_of_chained_exception(evalue)
   1149         if exception:
-> 1150             formatted_exceptions += self.prepare_chained_exception_message(evalue.__cause__)
   1151             etype, evalue, etb = exception
   1152         else:

TypeError: can only concatenate str (not "list") to str
1 answers ( 0 marked as helpful)
Posted on:

28 Jul 2022

0

This is a bit of a late reply but I had this same issue and was able to download the dataset with the below code. Import the OS library so it can read the local working directory where the mnist file will be downloaded. I'm not sure if this will also download the mnist "info" data but it's not needed as you can manually assign test and validation samples later in the lesson.


import tensorflow as tf
from tensorflow.keras.datasets import mnist
import os
#get current directory for file
current_dir = os.getcwd()
#images dataset are 28x28 array that contain grayscale values 0 to 255, labels contain the image label (e.g. 0, 1, 2, 3...)
(train_images,train_labels),(test_images,test_labels) = mnist.load_data(path=current_dir+"/mnist.npz")
#Create Tensorflow Dataset
mnist_train = tf.data.Dataset.from_tensor_slices((train_images, train_labels))
mnist_test = tf.data.Dataset.from_tensor_slices((test_images, test_labels))

Submit an answer