GINDataset download failed

import dgl.data
dataset = dgl.data.GINDataset('MUTAG', False)

The error is as follows:
C:\Users\82090\AppData\Local\Programs\Python\Python38\python.exe D:/PycharmProjects/StreamSpot/gnn_demo.py
Using backend: pytorch
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 4 attempts left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 3 attempts left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 2 attempts left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 1 attempt left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 4 attempts left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 3 attempts left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 2 attempts left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
download failed, retrying, 1 attempt left
Downloading C:\Users\82090.dgl\GINDataset.zip from https://raw.githubusercontent.com/weihua916/powerful-gnns/master/dataset.zip
Traceback (most recent call last):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py”, line 156, in _new_conn
conn = connection.create_connection(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\connection.py”, line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\socket.py”, line 914, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 665, in urlopen
httplib_response = self._make_request(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 376, in _make_request
self._validate_conn(conn)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 994, in _validate_conn
conn.connect()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py”, line 300, in connect
conn = self._new_conn()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py”, line 168, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x0000020FAD03C2B0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py”, line 439, in send
resp = conn.urlopen(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 719, in urlopen
retries = retries.increment(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py”, line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘raw.githubusercontent.com’, port=443): Max retries exceeded with url: /weihua916/powerful-gnns/master/dataset.zip (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x0000020FAD03C2B0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\utils\internal.py”, line 619, in wrapper
return func(self, *args, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\dgl_dataset.py”, line 147, in _download
self.download()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\gindt.py”, line 110, in download
download(self.url, path=zip_file_path)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\utils.py”, line 161, in download
raise e
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\utils.py”, line 145, in download
r = requests.get(url, stream=True, verify=verify_ssl)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py”, line 76, in get
return request(‘get’, url, params=params, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py”, line 530, in request
resp = self.send(prep, **send_kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py”, line 643, in send
r = adapter.send(request, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘raw.githubusercontent.com’, port=443): Max retries exceeded with url: /weihua916/powerful-gnns/master/dataset.zip (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x0000020FAD03C2B0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py”, line 156, in _new_conn
conn = connection.create_connection(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\connection.py”, line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\socket.py”, line 914, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 665, in urlopen
httplib_response = self._make_request(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 376, in _make_request
self._validate_conn(conn)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 994, in _validate_conn
conn.connect()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py”, line 300, in connect
conn = self._new_conn()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py”, line 168, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x0000020FAD03CCA0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py”, line 439, in send
resp = conn.urlopen(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py”, line 719, in urlopen
retries = retries.increment(
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py”, line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘raw.githubusercontent.com’, port=443): Max retries exceeded with url: /weihua916/powerful-gnns/master/dataset.zip (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x0000020FAD03CCA0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:/PycharmProjects/StreamSpot/gnn_demo.py”, line 36, in
dataset = dgl.data.GINDataset(‘MUTAG’, False)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\gindt.py”, line 99, in init
super(GINDataset, self).init(name=name, url=gin_url, hash_key=(name, self_loop, degree_as_nlabel),
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\dgl_dataset.py”, line 278, in init
super(DGLBuiltinDataset, self).init(name,
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\dgl_dataset.py”, line 91, in init
self._load()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\dgl_dataset.py”, line 174, in _load
self._download()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\utils\internal.py”, line 622, in wrapper
return func(self, *args, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\dgl_dataset.py”, line 147, in _download
self.download()
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\gindt.py”, line 110, in download
download(self.url, path=zip_file_path)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\utils.py”, line 161, in download
raise e
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\dgl\data\utils.py”, line 145, in download
r = requests.get(url, stream=True, verify=verify_ssl)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py”, line 76, in get
return request(‘get’, url, params=params, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py”, line 530, in request
resp = self.send(prep, **send_kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py”, line 643, in send
r = adapter.send(request, **kwargs)
File “C:\Users\82090\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘raw.githubusercontent.com’, port=443): Max retries exceeded with url: /weihua916/powerful-gnns/master/dataset.zip (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x0000020FAD03CCA0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed’))

Process finished with exit code 1

Can you try reinstalling the requests package?

yes, but it not works

Are you in mainland China?

1 Like

Yes, but I use the proxy when I run the code.

You can set the proxy environment variable at the very beginning of the program, to ensure the connection is over the proxy. For example

import os
os.environ['HTTP_PROXY']="http://127.0.0.1:9999"
os.environ['HTTPS_PROXY']="http://127.0.0.1:9999"
...# Other codes
1 Like

OK, it works!
Appreciate your answer!