# TimeoutError \[100060\]?

**URL:** <https://discuss.huggingface.co/t/timeouterror-100060/128366>\
**Category:** Beginners\
**Created:** [November 29, 2024, 2:37am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366 "2024-11-29T02:37:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 2:37am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/1 "2024-11-29T02:37:10Z")

</div>

Dear @John6666 and other community members

TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond During handling of the above exception, another exception occurred:

ConnectionError: (ProtocolError(‘Connection aborted.’, TimeoutError(10060, ‘A connection attempt failed because the  
connected party did not properly respond after a period of time, or established connection failed because connected  
host has failed to respond’, None, 10060, None)), ‘(Request ID: 34f638f9-0518-48da-aae7-6dcd50daa757)’)

I changed the token, reset the variables, check internet connections, what happened?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 2:39am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/2 "2024-11-29T02:39:21Z")

</div>

What environment?

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 2:39am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/3 "2024-11-29T02:39:50Z")

</div>

miniConda, does it do with the environment?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 2:41am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/4 "2024-11-29T02:41:50Z")

</div>

Using Conda probably means you’re working in a local environment. Judging from the error message, it seems to be a Windows environment. I wonder if the connection from the local environment is not working properly.  
Was it working properly until yesterday?

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 2:43am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/5 "2024-11-29T02:43:08Z")

</div>

Last time I ran it, it ran into CPU memory problem, then I ran it again and again and faces that. Should I clean some caches? Sorry for the mislicked as solution, haven’t sleeped

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 2:47am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/6 "2024-11-29T02:47:18Z")

</div>

Oh, if it disappears using the Solution function, I think you can just post it again.😅  
If it’s not working once, it’s possible that the environment is not working properly…  
However, if you’re doing it from Python, it’s unlikely to be a browser setting, and it’s often the case that it’s due to VPN, SSL, router settings, or internal network settings, but do you have any ideas?

Edit:  
Because this is an error that has occurred for various reasons since long ago, it is not possible to identify the cause or solution just from the error.

> <https://github.com/tgalal/yowsup/issues/319>
>
> Command I tried is 
> 
> python yowsup-cli --requestcode voice -c D:\\Official\\Work\\R…TB\\CEM\\RTB\\yowsup-master\\yowsup-master\\src/yowsup-cli.conf
> 
> Getting Following error while connecting. Request for the help.
> \# 
> 
> File "D:\\Official\\Work\\RTB\\CEM\\RTB\\yowsup-master\\yowsup-master\\src\\Yowsup\\Comm
> on\\Http\\warequest.py", line 194, in sendRequest
> conn.request(reqType, path, params, headers);
> File "C:\\Python34\\lib\\http\\client.py", line 1090, in request
> self.\_send\_request(method, url, body, headers)
> File "C:\\Python34\\lib\\http\\client.py", line 1128, in \_send\_request
> self.endheaders(body)
> File "C:\\Python34\\lib\\http\\client.py", line 1086, in endheaders
> self.\_send\_output(message\_body)
> File "C:\\Python34\\lib\\http\\client.py", line 924, in \_send\_output
> self.send(msg)
> File "C:\\Python34\\lib\\http\\client.py", line 859, in send
> self.connect()
> File "C:\\Python34\\lib\\http\\client.py", line 1221, in connect
> super().connect()
> File "C:\\Python34\\lib\\http\\client.py", line 836, in connect
> self.timeout, self.source\_address)
> File "C:\\Python34\\lib\\socket.py", line 509, in create\_connection
> raise err
> File "C:\\Python34\\lib\\socket.py", line 500, in create\_connection
> sock.connect(sa)
> TimeoutError: \[WinError 10060\] A connection attempt failed because the connected
> party did not properly respond after a period of time, or established connectio
> n failed because connected host has failed to respond

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 2:51am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/7 "2024-11-29T02:51:39Z")

</div>

Yes that’s the problem, when I tried to look for the solution it went more than just huggingface. Let me check some of these.

But it does rains a lot since yesterday, I might need to go out for better connection

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 2:54am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/8 "2024-11-29T02:54:42Z")

</div>

HF related items.

> <https://github.com/huggingface/hf-hub/issues/41>
>
> In my Windows OS, when I run the example:
> \`\`\`rust
> use hf\_hub::api::sync::Api;
> …
> 
> fn main() {
> let api = Api::new().unwrap();
> 
> let repo = api.model("bert-base-uncased".to\_string());
> let \_filename = repo.get("config.json").unwrap();
> }
> \`\`\`
> \- It always raise \`Connect Timeout\` exception. I tried to use proxy, but it didn't work too.
> \- If using Python \`huggingface\_hub\` package, the exception didn't happen.
> !\[image\](https://github.com/huggingface/hf-hub/assets/85778126/ddbec343-d0eb-4ff3-972b-c3e3ea2d901c)

> <https://github.com/huggingface/huggingface_hub/issues/2319>
>
> \### Describe the bug
> 
> Hi I am consistently getting this error when I try to us…e a tokenizer, mode or pipeline from pretrained hf models:
> 
> \> OSError: We couldn't connect to 'https://huggingface.co/' to load this file, couldn't find it in the cached files and it looks like google-bert/bert-base-german-cased is not the path to a directory containing a file named config.json.
> Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
> 
> I checked my connection and cleared out the cache. Moreover when I update hugging face\_hub\[cli\] with pip install huggingface\_hub\[cli\], I get the following warning:
> \> WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('\<pip.\_vendor.urllib3.connection.HTTPSConnection object at 0x7fc032677010\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable')': /simple/huggingface-hub/
> 
> 
> The models I try to access were google-bert/bert-base-german-cased and dbmdz/bert-base-german-uncased. I am running the code on google cloud instances on n2d-standard-4 (4 vCPUs, 16 GB RAM) machine with transformers version 4.40.2. Could you please let me know what leads to this error and help me solve it?
> 
> \### Reproduction
> 
> from transformers import AutoTokenizer, AutoModelForMaskedLM
> 
> tokenizer = AutoTokenizer.from\_pretrained("google-bert/bert-base-german-cased")
> model = AutoModelForMaskedLM.from\_pretrained("google-bert/bert-base-german-cased")
> 
> \### Logs
> 
> \---------------------------------------------------------------------------
> OSError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:198, in HTTPConnection.\_new\_conn(self)
> 197 try:
> \--\> 198 sock = connection.create\_connection(
> 199 (self.\_dns\_host, self.port),
> 200 self.timeout,
> 201 source\_address=self.source\_address,
> 202 socket\_options=self.socket\_options,
> 203 )
> 204 except socket.gaierror as e:
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/util/connection.py:85, in create\_connection(address, timeout, source\_address, socket\_options)
> 84 try:
> \---\> 85 raise err
> 86 finally:
> 87 # Break explicitly a reference cycle
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/util/connection.py:73, in create\_connection(address, timeout, source\_address, socket\_options)
> 72 sock.bind(source\_address)
> \---\> 73 sock.connect(sa)
> 74 # Break explicitly a reference cycle
> 
> OSError: \[Errno 101\] Network is unreachable
> 
> The above exception was the direct cause of the following exception:
> 
> NewConnectionError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:793, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert\_same\_host, timeout, pool\_timeout, release\_conn, chunked, body\_pos, preload\_content, decode\_content, \*\*response\_kw)
> 792 # Make the request on the HTTPConnection object
> \--\> 793 response = self.\_make\_request(
> 794 conn,
> 795 method,
> 796 url,
> 797 timeout=timeout\_obj,
> 798 body=body,
> 799 headers=headers,
> 800 chunked=chunked,
> 801 retries=retries,
> 802 response\_conn=response\_conn,
> 803 preload\_content=preload\_content,
> 804 decode\_content=decode\_content,
> 805 \*\*response\_kw,
> 806 )
> 808 # Everything went great!
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:491, in HTTPConnectionPool.\_make\_request(self, conn, method, url, body, headers, retries, timeout, chunked, response\_conn, preload\_content, decode\_content, enforce\_content\_length)
> 490 new\_e = \_wrap\_proxy\_error(new\_e, conn.proxy.scheme)
> \--\> 491 raise new\_e
> 493 # conn.request() calls http.client.\*.request, not the method in
> 494 # urllib3.request. It also calls makefile (recv) on the socket.
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:467, in HTTPConnectionPool.\_make\_request(self, conn, method, url, body, headers, retries, timeout, chunked, response\_conn, preload\_content, decode\_content, enforce\_content\_length)
> 466 try:
> \--\> 467 self.\_validate\_conn(conn)
> 468 except (SocketTimeout, BaseSSLError) as e:
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:1099, in HTTPSConnectionPool.\_validate\_conn(self, conn)
> 1098 if conn.is\_closed:
> \-\> 1099 conn.connect()
> 1101 # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:616, in HTTPSConnection.connect(self)
> 615 sock: socket.socket | ssl.SSLSocket
> \--\> 616 self.sock = sock = self.\_new\_conn()
> 617 server\_hostname: str = self.host
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:213, in HTTPConnection.\_new\_conn(self)
> 212 except OSError as e:
> \--\> 213 raise NewConnectionError(
> 214 self, f"Failed to establish a new connection: {e}"
> 215 ) from e
> 217 # Audit hooks are only available in Python 3.8+
> 
> NewConnectionError: \<urllib3.connection.HTTPSConnection object at 0x7fa15b2b3880\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable
> 
> The above exception was the direct cause of the following exception:
> 
> MaxRetryError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/requests/adapters.py:486, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
> 485 try:
> \--\> 486 resp = conn.urlopen(
> 487 method=request.method,
> 488 url=url,
> 489 body=request.body,
> 490 headers=request.headers,
> 491 redirect=False,
> 492 assert\_same\_host=False,
> 493 preload\_content=False,
> 494 decode\_content=False,
> 495 retries=self.max\_retries,
> 496 timeout=timeout,
> 497 chunked=chunked,
> 498 )
> 500 except (ProtocolError, OSError) as err:
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:847, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert\_same\_host, timeout, pool\_timeout, release\_conn, chunked, body\_pos, preload\_content, decode\_content, \*\*response\_kw)
> 845 new\_e = ProtocolError("Connection aborted.", new\_e)
> \--\> 847 retries = retries.increment(
> 848 method, url, error=new\_e, \_pool=self, \_stacktrace=sys.exc\_info()\[2\]
> 849 )
> 850 retries.sleep()
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/util/retry.py:515, in Retry.increment(self, method, url, response, error, \_pool, \_stacktrace)
> 514 reason = error or ResponseError(cause)
> \--\> 515 raise MaxRetryError(\_pool, url, reason) from reason # type: ignore\[arg-type\]
> 517 log.debug("Incremented Retry for (url='%s'): %r", url, new\_retry)
> 
> MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /google-bert/bert-base-german-cased/resolve/main/config.json (Caused by NewConnectionError('\<urllib3.connection.HTTPSConnection object at 0x7fa15b2b3880\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable'))
> 
> During handling of the above exception, another exception occurred:
> 
> ConnectionError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1722, in \_get\_metadata\_or\_catch\_error(repo\_id, filename, repo\_type, revision, endpoint, proxies, etag\_timeout, headers, local\_files\_only, relative\_filename, storage\_folder)
> 1721 try:
> \-\> 1722 metadata = get\_hf\_file\_metadata(url=url, proxies=proxies, timeout=etag\_timeout, headers=headers)
> 1723 except EntryNotFoundError as http\_error:
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/utils/\_validators.py:114, in validate\_hf\_hub\_args.\<locals\>.\_inner\_fn(\*args, \*\*kwargs)
> 112 kwargs = smoothly\_deprecate\_use\_auth\_token(fn\_name=fn.\_\_name\_\_, has\_token=has\_token, kwargs=kwargs)
> \--\> 114 return fn(\*args, \*\*kwargs)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1645, in get\_hf\_file\_metadata(url, token, proxies, timeout, library\_name, library\_version, user\_agent, headers)
> 1644 # Retrieve metadata
> \-\> 1645 r = \_request\_wrapper(
> 1646 method="HEAD",
> 1647 url=url,
> 1648 headers=headers,
> 1649 allow\_redirects=False,
> 1650 follow\_relative\_redirects=True,
> 1651 proxies=proxies,
> 1652 timeout=timeout,
> 1653 )
> 1654 hf\_raise\_for\_status(r)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:372, in \_request\_wrapper(method, url, follow\_relative\_redirects, \*\*params)
> 371 if follow\_relative\_redirects:
> \--\> 372 response = \_request\_wrapper(
> 373 method=method,
> 374 url=url,
> 375 follow\_relative\_redirects=False,
> 376 \*\*params,
> 377 )
> 379 # If redirection, we redirect only relative paths.
> 380 # This is useful in case of a renamed repository.
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:395, in \_request\_wrapper(method, url, follow\_relative\_redirects, \*\*params)
> 394 # Perform request and return if status\_code is not in the retry list.
> \--\> 395 response = get\_session().request(method=method, url=url, \*\*params)
> 396 hf\_raise\_for\_status(response)
> 
> File /opt/conda/lib/python3.10/site-packages/requests/sessions.py:589, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow\_redirects, proxies, hooks, stream, verify, cert, json)
> 588 send\_kwargs.update(settings)
> \--\> 589 resp = self.send(prep, \*\*send\_kwargs)
> 591 return resp
> 
> File /opt/conda/lib/python3.10/site-packages/requests/sessions.py:703, in Session.send(self, request, \*\*kwargs)
> 702 # Send the request
> \--\> 703 r = adapter.send(request, \*\*kwargs)
> 705 # Total elapsed time of the request (approximately)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/utils/\_http.py:66, in UniqueRequestIdAdapter.send(self, request, \*args, \*\*kwargs)
> 65 try:
> \---\> 66 return super().send(request, \*args, \*\*kwargs)
> 67 except requests.RequestException as e:
> 
> File /opt/conda/lib/python3.10/site-packages/requests/adapters.py:519, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
> 517 raise SSLError(e, request=request)
> \--\> 519 raise ConnectionError(e, request=request)
> 521 except ClosedPoolError as e:
> 
> ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /google-bert/bert-base-german-cased/resolve/main/config.json (Caused by NewConnectionError('\<urllib3.connection.HTTPSConnection object at 0x7fa15b2b3880\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable'))"), '(Request ID: 8df1d542-4895-405c-b79d-4d2ca4001529)')
> 
> The above exception was the direct cause of the following exception:
> 
> LocalEntryNotFoundError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py:398, in cached\_file(path\_or\_repo\_id, filename, cache\_dir, force\_download, resume\_download, proxies, token, revision, local\_files\_only, subfolder, repo\_type, user\_agent, \_raise\_exceptions\_for\_gated\_repo, \_raise\_exceptions\_for\_missing\_entries, \_raise\_exceptions\_for\_connection\_errors, \_commit\_hash, \*\*deprecated\_kwargs)
> 396 try:
> 397 # Load from URL or cache if already cached
> \--\> 398 resolved\_file = hf\_hub\_download(
> 399 path\_or\_repo\_id,
> 400 filename,
> 401 subfolder=None if len(subfolder) == 0 else subfolder,
> 402 repo\_type=repo\_type,
> 403 revision=revision,
> 404 cache\_dir=cache\_dir,
> 405 user\_agent=user\_agent,
> 406 force\_download=force\_download,
> 407 proxies=proxies,
> 408 resume\_download=resume\_download,
> 409 token=token,
> 410 local\_files\_only=local\_files\_only,
> 411 )
> 412 except GatedRepoError as e:
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/utils/\_validators.py:114, in validate\_hf\_hub\_args.\<locals\>.\_inner\_fn(\*args, \*\*kwargs)
> 112 kwargs = smoothly\_deprecate\_use\_auth\_token(fn\_name=fn.\_\_name\_\_, has\_token=has\_token, kwargs=kwargs)
> \--\> 114 return fn(\*args, \*\*kwargs)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1221, in hf\_hub\_download(repo\_id, filename, subfolder, repo\_type, revision, library\_name, library\_version, cache\_dir, local\_dir, user\_agent, force\_download, proxies, etag\_timeout, token, local\_files\_only, headers, endpoint, legacy\_cache\_layout, resume\_download, force\_filename, local\_dir\_use\_symlinks)
> 1220 else:
> \-\> 1221 return \_hf\_hub\_download\_to\_cache\_dir(
> 1222 # Destination
> 1223 cache\_dir=cache\_dir,
> 1224 # File info
> 1225 repo\_id=repo\_id,
> 1226 filename=filename,
> 1227 repo\_type=repo\_type,
> 1228 revision=revision,
> 1229 # HTTP info
> 1230 headers=headers,
> 1231 proxies=proxies,
> 1232 etag\_timeout=etag\_timeout,
> 1233 endpoint=endpoint,
> 1234 # Additional options
> 1235 local\_files\_only=local\_files\_only,
> 1236 force\_download=force\_download,
> 1237 )
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1325, in \_hf\_hub\_download\_to\_cache\_dir(cache\_dir, repo\_id, filename, repo\_type, revision, headers, proxies, etag\_timeout, endpoint, local\_files\_only, force\_download)
> 1324 # Otherwise, raise appropriate error
> \-\> 1325 \_raise\_on\_head\_call\_error(head\_call\_error, force\_download, local\_files\_only)
> 1327 # From now on, etag, commit\_hash, url and size are not None.
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1826, in \_raise\_on\_head\_call\_error(head\_call\_error, force\_download, local\_files\_only)
> 1824 else:
> 1825 # Otherwise: most likely a connection issue or Hub downtime =\> let's warn the user
> \-\> 1826 raise LocalEntryNotFoundError(
> 1827 "An error happened while trying to locate the file on the Hub and we cannot find the requested files"
> 1828 " in the local cache. Please check your connection and try again or make sure your Internet connection"
> 1829 " is on."
> 1830 ) from head\_call\_error
> 
> LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.
> 
> The above exception was the direct cause of the following exception:
> 
> OSError Traceback (most recent call last)
> Cell In\[13\], line 3
> 1 from transformers import AutoTokenizer, AutoModelForMaskedLM
> \----\> 3 tokenizer = AutoTokenizer.from\_pretrained("google-bert/bert-base-german-cased")
> 4 model = AutoModelForMaskedLM.from\_pretrained("google-bert/bert-base-german-cased")
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/models/auto/tokenization\_auto.py:819, in AutoTokenizer.from\_pretrained(cls, pretrained\_model\_name\_or\_path, \*inputs, \*\*kwargs)
> 817 if config\_tokenizer\_class is None:
> 818 if not isinstance(config, PretrainedConfig):
> \--\> 819 config = AutoConfig.from\_pretrained(
> 820 pretrained\_model\_name\_or\_path, trust\_remote\_code=trust\_remote\_code, \*\*kwargs
> 821 )
> 822 config\_tokenizer\_class = config.tokenizer\_class
> 823 if hasattr(config, "auto\_map") and "AutoTokenizer" in config.auto\_map:
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/models/auto/configuration\_auto.py:928, in AutoConfig.from\_pretrained(cls, pretrained\_model\_name\_or\_path, \*\*kwargs)
> 925 trust\_remote\_code = kwargs.pop("trust\_remote\_code", None)
> 926 code\_revision = kwargs.pop("code\_revision", None)
> \--\> 928 config\_dict, unused\_kwargs = PretrainedConfig.get\_config\_dict(pretrained\_model\_name\_or\_path, \*\*kwargs)
> 929 has\_remote\_code = "auto\_map" in config\_dict and "AutoConfig" in config\_dict\["auto\_map"\]
> 930 has\_local\_code = "model\_type" in config\_dict and config\_dict\["model\_type"\] in CONFIG\_MAPPING
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/configuration\_utils.py:631, in PretrainedConfig.get\_config\_dict(cls, pretrained\_model\_name\_or\_path, \*\*kwargs)
> 629 original\_kwargs = copy.deepcopy(kwargs)
> 630 # Get config dict associated with the base config file
> \--\> 631 config\_dict, kwargs = cls.\_get\_config\_dict(pretrained\_model\_name\_or\_path, \*\*kwargs)
> 632 if "\_commit\_hash" in config\_dict:
> 633 original\_kwargs\["\_commit\_hash"\] = config\_dict\["\_commit\_hash"\]
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/configuration\_utils.py:686, in PretrainedConfig.\_get\_config\_dict(cls, pretrained\_model\_name\_or\_path, \*\*kwargs)
> 682 configuration\_file = kwargs.pop("\_configuration\_file", CONFIG\_NAME)
> 684 try:
> 685 # Load from local folder or from cache or download from model Hub and cache
> \--\> 686 resolved\_config\_file = cached\_file(
> 687 pretrained\_model\_name\_or\_path,
> 688 configuration\_file,
> 689 cache\_dir=cache\_dir,
> 690 force\_download=force\_download,
> 691 proxies=proxies,
> 692 resume\_download=resume\_download,
> 693 local\_files\_only=local\_files\_only,
> 694 token=token,
> 695 user\_agent=user\_agent,
> 696 revision=revision,
> 697 subfolder=subfolder,
> 698 \_commit\_hash=commit\_hash,
> 699 )
> 700 commit\_hash = extract\_commit\_hash(resolved\_config\_file, commit\_hash)
> 701 except EnvironmentError:
> 702 # Raise any environment error raise by \`cached\_file\`. It will have a helpful error message adapted to
> 703 # the original exception.
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py:441, in cached\_file(path\_or\_repo\_id, filename, cache\_dir, force\_download, resume\_download, proxies, token, revision, local\_files\_only, subfolder, repo\_type, user\_agent, \_raise\_exceptions\_for\_gated\_repo, \_raise\_exceptions\_for\_missing\_entries, \_raise\_exceptions\_for\_connection\_errors, \_commit\_hash, \*\*deprecated\_kwargs)
> 435 if (
> 436 resolved\_file is not None
> 437 or not \_raise\_exceptions\_for\_missing\_entries
> 438 or not \_raise\_exceptions\_for\_connection\_errors
> 439 ):
> 440 return resolved\_file
> \--\> 441 raise EnvironmentError(
> 442 f"We couldn't connect to '{HUGGINGFACE\_CO\_RESOLVE\_ENDPOINT}' to load this file, couldn't find it in the"
> 443 f" cached files and it looks like {path\_or\_repo\_id} is not the path to a directory containing a file named"
> 444 f" {full\_filename}.\\nCheckout your internet connection or see how to run the library in offline mode at"
> 445 " 'https://huggingface.co/docs/transformers/installation#offline-mode'."
> 446 ) from e
> 447 except EntryNotFoundError as e:
> 448 if not \_raise\_exceptions\_for\_missing\_entries:
> 
> OSError: We couldn't connect to 'https://huggingface.co/' to load this file, couldn't find it in the cached files and it looks like google-bert/bert-base-german-cased is not the path to a directory containing a file named config.json.
> Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
> 
> \### System info
> 
> \`\`\`shell
> \- huggingface\_hub version: 0.23.1
> \- Platform: Linux-5.10.0-29-cloud-amd64-x86\_64-with-glibc2.31
> \- Python version: 3.10.14
> \- Running in iPython ?: Yes
> \- iPython shell: ZMQInteractiveShell
> \- Running in notebook ?: Yes
> \- Running in Google Colab ?: No
> \- Token path ?: /home/jupyter/.cache/huggingface/token
> \- Has saved token ?: False
> \- Configured git credential helpers: 
> \- FastAI: N/A
> \- Tensorflow: N/A
> \- Torch: 2.3.0
> \- Jinja2: 3.1.4
> \- Graphviz: N/A
> \- keras: N/A
> \- Pydot: N/A
> \- Pillow: 10.3.0
> \- hf\_transfer: N/A
> \- gradio: N/A
> \- tensorboard: 2.6.2.2
> \- numpy: 1.26.4
> \- pydantic: 1.10.15
> \- aiohttp: 3.9.5
> \- ENDPOINT: https://huggingface.co
> \- HF\_HUB\_CACHE: /home/jupyter/.cache/huggingface/hub
> \- HF\_ASSETS\_CACHE: /home/jupyter/.cache/huggingface/assets
> \- HF\_TOKEN\_PATH: /home/jupyter/.cache/huggingface/token
> \- HF\_HUB\_OFFLINE: False
> \- HF\_HUB\_DISABLE\_TELEMETRY: False
> \- HF\_HUB\_DISABLE\_PROGRESS\_BARS: None
> \- HF\_HUB\_DISABLE\_SYMLINKS\_WARNING: False
> \- HF\_HUB\_DISABLE\_EXPERIMENTAL\_WARNING: False
> \- HF\_HUB\_DISABLE\_IMPLICIT\_TOKEN: False
> \- HF\_HUB\_ENABLE\_HF\_TRANSFER: False
> \- HF\_HUB\_ETAG\_TIMEOUT: 10
> \- HF\_HUB\_DOWNLOAD\_TIMEOUT: 10
> \`\`\`

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 3:07am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/9 "2024-11-29T03:07:30Z")

</div>

Used cat5 cable and the error become this

CalledProcessError: Command ‘[‘git’, ‘pull’]’ returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

OSError: fatal: refusing to merge unrelated histories

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 3:10am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/10 "2024-11-29T03:10:29Z")

</div>

Well, you need a cat5e cable, but that’s beside the point.  
The fact that the symptoms change means that the problem is inside the router, including the router. It doesn’t seem like someone is blocking it. It can probably be resolved, but there is some kind of problem lurking in your environment itself.

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 3:11am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/11 "2024-11-29T03:11:51Z")

</div>

Is there a solution to that “Refusing to merge unrelated histories” tho, it also went far beyond huggingface scope.

Yea I think I’ll try using the cable or try going out

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 3:13am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/12 "2024-11-29T03:13:47Z")

</div>

If you’re trying to use git on Windows, it’s possible to use it as standard, but you’ll need to install these manually to make it practically usable. Let’s install them.

> **[Git for Windows](https://gitforwindows.org/)**
>
> We bring the awesome Git VCS to Windows

> **[Git Large File Storage](https://git-lfs.com/)**
>
> Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 3:15am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/13 "2024-11-29T03:15:50Z")

</div>

I didn’t use any git commands as far as I can see, is it on the huggingface functions or something?

I obviously would know if I used one and will check my git connections, but it doesn’t seem so. Is it on the `dataset` taking?

But if it’s the case then this code means nothing, this codes normally would means every variables are local now. I don’t even know why I have internet problems

```auto
# load dataset from huggingface
hf_dataset_identifier = "seand0101/manggarai-watergate"
ds = load_dataset(hf_dataset_identifier)

```

```auto
# To configure the model, extract the number of unique labels

repo_id = f"datasets/{hf_dataset_identifier}"
filename = "id2label.json" # Define the filename containing label information

# Download the 'id2label.json' file
id2label = json.load(open(hf_hub_download(repo_id=hf_dataset_identifier, filename=filename, repo_type="dataset"), "r"))

# Convert the keys in 'id2label' from strings to integers and store the result in 'id2label'
id2label = {int(k): v for k, v in id2label.items()}

# Create a 'label2id' dictionary by reversing the key-value pairs in 'id2label'
label2id = {v: k for k, v in id2label.items()}

# Calculate the number of unique labels in the dataset
num_labels = len(id2label)

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 3:17am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/14 "2024-11-29T03:17:17Z")

</div>

What? I think you’ve got a git error though.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 3:19am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/15 "2024-11-29T03:19:36Z")

</div>

For now, I think it would be a good idea to update the libraries for HF communications-related things.

```auto
pip install -U datasets huggingface_hub

```

Edit:  
If you set this to a local path, it should work even without an internet connection, but it’s better to think about it after it’s working with an internet connection.

```py
# load dataset from huggingface
hf_dataset_identifier = "seand0101/manggarai-watergate"
ds = load_dataset(hf_dataset_identifier)

```

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 3:21am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/16 "2024-11-29T03:21:45Z")

</div>

Will try that, got it. Do you mind checking my [dataset](https://huggingface.co/datasets/seand0101/manggarai-watergate) and .json too probably there’s something wrong with my first curated dataset ever.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 3:28am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/17 "2024-11-29T03:28:31Z")

</div>

From DatasetViewer, it looks like a normal image dataset, with **pixel\_values as the image and labels as the masked image**. The authors of DatasetViewer and the datasets library are to some extent the same, so if it looks normal in DatasetViewer, it can generally be handled normally in the datasets library.  
However, the way you handle it (how you write the code) will naturally change depending on the structure of the dataset.  
Your dataset is a combination of images and images, so it’s a little unusual. Datasets that only contain text and images, just texts, and just images are the majority. It should be possible to use it, but you’ll have to search to find out how to use it.

> **[Image Dataset](https://huggingface.co/docs/hub/main/en/datasets-image)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> **[Semantic segmentation](https://huggingface.co/docs/datasets/semantic_segmentation)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 3:40am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/18 "2024-11-29T03:40:31Z")

</div>

I thought when compared to that sidewalk dataset, they also include masking to their second class. How to convert these masks into “labels” like they do? Noted will check that out thanks again John6666

---

<div class="post-metadata">

**Author:** ![seand0101](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/seand0101/32/35961_2.png) [@seand0101](https://discuss.huggingface.co/u/seand0101)\
**Post date:** [November 29, 2024, 3:42am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/19 "2024-11-29T03:42:03Z")

</div>

> [@John6666](#):
>
> Edit:  
> If you set this to a local path, it should work even without an internet connection, but it’s better to think about it after it’s working with an internet connection.

Oh so it doesn’t matter if I cached it first in Jupyter Notebook it will still look for online repo for variable when training?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 29, 2024, 3:51am UTC](https://discuss.huggingface.co/t/timeouterror-100060/128366/20 "2024-11-29T03:51:10Z")

</div>

> How to convert these masks into “labels” like they do?

I have no idea! A mask is a mask. It’s normal to use a dataset that combines images and masks.  
Can it be used to train an image segmentation model?  
Basically, you need to specify what you want the AI to learn in some way. If AI doesn’t know what to learn, it’s very inefficient. Of course, it is possible to automate the labeling process to some extent using AI. You can have a smarter, already-trained large AI model do the labeling, and then use that as a dataset to train smaller models. But this wouldn’t be called a conversion. It would be a process.

> Oh so it doesn’t matter if I cached it first in Jupyter Notebook it will still look for online repo for variable when training?

No, it’s not that specific. We were talking about how it would be inconvenient if you couldn’t use HF because of your local environment, so let’s fix that first.😅

[Next page](https://discuss.huggingface.co/t/timeouterror-100060/128366.md?page=2)
