{
  "id": 130042,
  "title": "Can't access the data",
  "url": "/competitions/flower-classification-with-tpus/discussion/130042",
  "author_name": "",
  "post_date": "2020-02-11T20:37:51.331868700Z",
  "votes": 4,
  "comment_count": 16,
  "views": 0,
  "content": "<p>When I run  <code>GCS_DS_PATH = KaggleDatasets().get_gcs_path()</code>, I get \"ConnectionError: Connection error trying to communicate with service.\" Is it just me, or other people have the same problem as well?</p>",
  "messages": [
    {
      "id": "743143",
      "postDate": "02/11/2020 20:37:51",
      "content": "<p>When I run  <code>GCS_DS_PATH = KaggleDatasets().get_gcs_path()</code>, I get \"ConnectionError: Connection error trying to communicate with service.\" Is it just me, or other people have the same problem as well?</p>",
      "rawMarkdown": "When I run  `GCS_DS_PATH = KaggleDatasets().get_gcs_path()`, I get \"ConnectionError: Connection error trying to communicate with service.\" Is it just me, or other people have the same problem as well?",
      "votes": null
    },
    {
      "id": "743150",
      "postDate": "02/11/2020 20:53:30",
      "content": "<p>That can happen the first time you execute the command. Have you tried running the cell another time?</p>",
      "rawMarkdown": "That can happen the first time you execute the command. Have you tried running the cell another time?",
      "votes": null
    },
    {
      "id": "743390",
      "postDate": "02/12/2020 02:47:10",
      "content": "<p>If you are still seeing this error, would you please post the full error message and trace so I can investigate?</p>",
      "rawMarkdown": "If you are still seeing this error, would you please post the full error message and trace so I can investigate?",
      "votes": null
    },
    {
      "id": "743486",
      "postDate": "02/12/2020 05:28:33",
      "content": "<p>Or maybe internet is off? 👀 </p>",
      "rawMarkdown": "Or maybe internet is off? 👀",
      "votes": null
    },
    {
      "id": "743752",
      "postDate": "02/12/2020 09:13:23",
      "content": "<p><a href=\"https://pastebin.com/c8Yei24Z\">https://pastebin.com/c8Yei24Z</a></p>",
      "rawMarkdown": "https://pastebin.com/c8Yei24Z",
      "votes": null
    },
    {
      "id": "743755",
      "postDate": "02/12/2020 09:14:17",
      "content": "<p>Unfortunately, I still have that error.</p>",
      "rawMarkdown": "Unfortunately, I still have that error.",
      "votes": null
    },
    {
      "id": "743756",
      "postDate": "02/12/2020 09:15:09",
      "content": "<p>Is it possible to work with Kaggle without internet? 🤔 </p>",
      "rawMarkdown": "Is it possible to work with Kaggle without internet? 🤔",
      "votes": null
    },
    {
      "id": "743763",
      "postDate": "02/12/2020 09:27:18",
      "content": "<p>I meant the kernel's internet access :'D</p>",
      "rawMarkdown": "I meant the kernel's internet access :'D",
      "votes": null
    },
    {
      "id": "743767",
      "postDate": "02/12/2020 09:31:50",
      "content": "<p>You were right, it seems that Internet access was turned off in the notebook. I turned it on, and it works now. Thanks!</p>",
      "rawMarkdown": "You were right, it seems that Internet access was turned off in the notebook. I turned it on, and it works now. Thanks!",
      "votes": null
    },
    {
      "id": "744208",
      "postDate": "02/12/2020 16:49:16",
      "content": "<p>Yep, for the TPU integration to work properly, you’ll have to have internet on, which should happen by default when you start up a new notebook with the TPU accelerator.</p>",
      "rawMarkdown": "Yep, for the TPU integration to work properly, you’ll have to have internet on, which should happen by default when you start up a new notebook with the TPU accelerator.",
      "votes": null
    },
    {
      "id": "744349",
      "postDate": "02/12/2020 18:57:45",
      "content": "<p>I am glad this was resolved by toggling the \"internet\" switch in the kernel settings to ON. TPUs read data from GCS (Google Cloud Storage). They need access to that.</p>",
      "rawMarkdown": "I am glad this was resolved by toggling the \"internet\" switch in the kernel settings to ON. TPUs read data from GCS (Google Cloud Storage). They need access to that.",
      "votes": null
    },
    {
      "id": "744500",
      "postDate": "02/12/2020 22:18:04",
      "content": "<p>Like Julia said, the notebook's internet access should automatically turn on when you enable TPUs (or create a new notebook with TPU). I'd like to figure out why that didn't happen: How did you create the notebook, was it a fork or a brand new notebook? Did you explicitly turn off internet for the notebook?</p>",
      "rawMarkdown": "Like Julia said, the notebook's internet access should automatically turn on when you enable TPUs (or create a new notebook with TPU). I'd like to figure out why that didn't happen: How did you create the notebook, was it a fork or a brand new notebook? Did you explicitly turn off internet for the notebook?",
      "votes": null
    },
    {
      "id": "745399",
      "postDate": "02/13/2020 19:30:15",
      "content": "<p>I just forked my notebook from \"Getting started...\" notebook.</p>",
      "rawMarkdown": "I just forked my notebook from \"Getting started...\" notebook.",
      "votes": null
    },
    {
      "id": "1117839",
      "postDate": "12/18/2020 13:59:29",
      "content": "<p>gaierror                                  Traceback (most recent call last)<br>\n/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)<br>\n   1318                 h.request(req.get_method(), req.selector, req.data, headers,<br>\n-&gt; 1319                           encode_chunked=req.has_header('Transfer-encoding'))<br>\n   1320             except OSError as err: # timeout error</p>\n<p>/opt/conda/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked)<br>\n   1251         \"\"\"Send a complete request to the server.\"\"\"<br>\n-&gt; 1252         self._send_request(method, url, body, headers, encode_chunked)<br>\n   1253 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)<br>\n   1297             body = _encode(body, 'body')<br>\n-&gt; 1298         self.endheaders(body, encode_chunked=encode_chunked)<br>\n   1299 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked)<br>\n   1246             raise CannotSendHeader()<br>\n-&gt; 1247         self._send_output(message_body, encode_chunked=encode_chunked)<br>\n   1248 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked)<br>\n   1025         del self._buffer[:]<br>\n-&gt; 1026         self.send(msg)<br>\n   1027 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in send(self, data)<br>\n    965             if self.auto_open:<br>\n--&gt; 966                 self.connect()<br>\n    967             else:</p>\n<p>/opt/conda/lib/python3.7/http/client.py in connect(self)<br>\n   1413 <br>\n-&gt; 1414             super().connect()<br>\n   1415 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in connect(self)<br>\n    937         self.sock = self._create_connection(<br>\n--&gt; 938             (self.host,self.port), self.timeout, self.source_address)<br>\n    939         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)</p>\n<p>/opt/conda/lib/python3.7/socket.py in create_connection(address, timeout, source_address)<br>\n    706     err = None<br>\n--&gt; 707     for res in getaddrinfo(host, port, 0, SOCK_STREAM):<br>\n    708         af, socktype, proto, canonname, sa = res</p>\n<p>/opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags)<br>\n    751     addrlist = []<br>\n--&gt; 752     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):<br>\n    753         af, socktype, proto, canonname, sa = res</p>\n<p>gaierror: [Errno -3] Temporary failure in name resolution</p>\n<p>During handling of the above exception, another exception occurred:</p>\n<p>URLError                                  Traceback (most recent call last)<br>\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)<br>\n     37         try:<br>\n---&gt; 38             with urllib.request.urlopen(req, timeout=self.TIMEOUT_SECS) as response:<br>\n     39                 response_json = json.loads(response.read())</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)<br>\n    221         opener = _opener<br>\n--&gt; 222     return opener.open(url, data, timeout)<br>\n    223 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)<br>\n    524 <br>\n--&gt; 525         response = self._open(req, data)<br>\n    526 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in _open(self, req, data)<br>\n    542         result = self._call_chain(self.handle_open, protocol, protocol +<br>\n--&gt; 543                                   '_open', req)<br>\n    544         if result:</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, <em>args)\n    502             func = getattr(handler, meth_name)\n--&gt; 503             result = func(</em>args)<br>\n    504             if result is not None:</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in https_open(self, req)<br>\n   1361             return self.do_open(http.client.HTTPSConnection, req,<br>\n-&gt; 1362                 context=self._context, check_hostname=self._check_hostname)<br>\n   1363 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)<br>\n   1320             except OSError as err: # timeout error<br>\n-&gt; 1321                 raise URLError(err)<br>\n   1322             r = h.getresponse()</p>\n<p>URLError: </p>\n<p>The above exception was the direct cause of the following exception:</p>\n<p>ConnectionError                           Traceback (most recent call last)<br>\n in <br>\n----&gt; 1 GCS_PATH = KaggleDatasets().get_gcs_path()</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)<br>\n     21             'IntegrationType': integration_type,<br>\n     22         }<br>\n---&gt; 23         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT)<br>\n     24         return result['destinationBucket']</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)<br>\n     49                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e<br>\n     50             raise ConnectionError(<br>\n---&gt; 51                 'Connection error trying to communicate with service.') from e<br>\n     52         except HTTPError as e:<br>\n     53             if e.code == 401 or e.code == 403:</p>\n<p>ConnectionError: Connection error trying to communicate with service.</p>",
      "rawMarkdown": "gaierror                                  Traceback (most recent call last)\n/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)\n   1318                 h.request(req.get_method(), req.selector, req.data, headers,\n-> 1319                           encode_chunked=req.has_header('Transfer-encoding'))\n   1320             except OSError as err: # timeout error\n\n/opt/conda/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked)\n   1251         \"\"\"Send a complete request to the server.\"\"\"\n-> 1252         self._send_request(method, url, body, headers, encode_chunked)\n   1253 \n\n/opt/conda/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)\n   1297             body = _encode(body, 'body')\n-> 1298         self.endheaders(body, encode_chunked=encode_chunked)\n   1299 \n\n/opt/conda/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked)\n   1246             raise CannotSendHeader()\n-> 1247         self._send_output(message_body, encode_chunked=encode_chunked)\n   1248 \n\n/opt/conda/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked)\n   1025         del self._buffer[:]\n-> 1026         self.send(msg)\n   1027 \n\n/opt/conda/lib/python3.7/http/client.py in send(self, data)\n    965             if self.auto_open:\n--> 966                 self.connect()\n    967             else:\n\n/opt/conda/lib/python3.7/http/client.py in connect(self)\n   1413 \n-> 1414             super().connect()\n   1415 \n\n/opt/conda/lib/python3.7/http/client.py in connect(self)\n    937         self.sock = self._create_connection(\n--> 938             (self.host,self.port), self.timeout, self.source_address)\n    939         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)\n\n/opt/conda/lib/python3.7/socket.py in create_connection(address, timeout, source_address)\n    706     err = None\n--> 707     for res in getaddrinfo(host, port, 0, SOCK_STREAM):\n    708         af, socktype, proto, canonname, sa = res\n\n/opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags)\n    751     addrlist = []\n--> 752     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\n    753         af, socktype, proto, canonname, sa = res\n\ngaierror: [Errno -3] Temporary failure in name resolution\n\nDuring handling of the above exception, another exception occurred:\n\nURLError                                  Traceback (most recent call last)\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)\n     37         try:\n---> 38             with urllib.request.urlopen(req, timeout=self.TIMEOUT_SECS) as response:\n     39                 response_json = json.loads(response.read())\n\n/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)\n    221         opener = _opener\n--> 222     return opener.open(url, data, timeout)\n    223 \n\n/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)\n    524 \n--> 525         response = self._open(req, data)\n    526 \n\n/opt/conda/lib/python3.7/urllib/request.py in _open(self, req, data)\n    542         result = self._call_chain(self.handle_open, protocol, protocol +\n--> 543                                   '_open', req)\n    544         if result:\n\n/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)\n    502             func = getattr(handler, meth_name)\n--> 503             result = func(*args)\n    504             if result is not None:\n\n/opt/conda/lib/python3.7/urllib/request.py in https_open(self, req)\n   1361             return self.do_open(http.client.HTTPSConnection, req,\n-> 1362                 context=self._context, check_hostname=self._check_hostname)\n   1363 \n\n/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)\n   1320             except OSError as err: # timeout error\n-> 1321                 raise URLError(err)\n   1322             r = h.getresponse()\n\nURLError: <urlopen error [Errno -3] Temporary failure in name resolution>\n\nThe above exception was the direct cause of the following exception:\n\nConnectionError                           Traceback (most recent call last)\n<ipython-input-8-2cec97546578> in <module>\n----> 1 GCS_PATH = KaggleDatasets().get_gcs_path()\n\n~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)\n     21             'IntegrationType': integration_type,\n     22         }\n---> 23         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT)\n     24         return result['destinationBucket']\n\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)\n     49                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e\n     50             raise ConnectionError(\n---> 51                 'Connection error trying to communicate with service.') from e\n     52         except HTTPError as e:\n     53             if e.code == 401 or e.code == 403:\n\nConnectionError: Connection error trying to communicate with service.",
      "votes": null
    },
    {
      "id": "1117844",
      "postDate": "12/18/2020 14:01:29",
      "content": "<p>hey can you please help to do that</p>",
      "rawMarkdown": "hey can you please help to do that",
      "votes": null
    },
    {
      "id": "1296842",
      "postDate": "05/07/2021 14:24:50",
      "content": "<p>Hi! You can find the kernel's internet switch as well as the accelerator under the settings dropdown menu on the right side of your notebook. Verification of your phone number seems mandatory when used for the very first time.</p>",
      "rawMarkdown": "Hi! You can find the kernel's internet switch as well as the accelerator under the settings dropdown menu on the right side of your notebook. Verification of your phone number seems mandatory when used for the very first time.",
      "votes": null
    },
    {
      "id": "1378638",
      "postDate": "07/06/2021 17:15:32",
      "content": "<p>Hi<br>\nI do have this problem even though the notebook has internet access and i noticed that this happens when the data is bigger than 1 GB , i even tried running the cell couple time as one suggested in this topic</p>\n<p>The trace back i got is :<br>\nHTTPError                                 Traceback (most recent call last)<br>\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)<br>\n     45         try:<br>\n---&gt; 46             with urllib.request.urlopen(req, timeout=timeout) as response:<br>\n     47                 response_json = json.loads(response.read())</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)<br>\n    221         opener = _opener<br>\n--&gt; 222     return opener.open(url, data, timeout)<br>\n    223 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)<br>\n    530             meth = getattr(processor, meth_name)<br>\n--&gt; 531             response = meth(req, response)<br>\n    532 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in http_response(self, request, response)<br>\n    640             response = self.parent.error(<br>\n--&gt; 641                 'http', request, response, code, msg, hdrs)<br>\n    642 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in error(self, proto, <em>args)\n    568             args = (dict, 'default', 'http_error_default') + orig_args\n--&gt; 569             return self._call_chain(</em>args)<br>\n    570 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, <em>args)\n    502             func = getattr(handler, meth_name)\n--&gt; 503             result = func(</em>args)<br>\n    504             if result is not None:</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)<br>\n    648     def http_error_default(self, req, fp, code, msg, hdrs):<br>\n--&gt; 649         raise HTTPError(req.full_url, code, msg, hdrs, fp)<br>\n    650 </p>\n<p>HTTPError: HTTP Error 502: Bad Gateway</p>\n<p>The above exception was the direct cause of the following exception:</p>\n<p>ConnectionError                           Traceback (most recent call last)<br>\n in <br>\n----&gt; 1 GCS_PATH1 = KaggleDatasets().get_gcs_path('breast-histopathology-images')</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)<br>\n     22             'IntegrationType': integration_type,<br>\n     23         }<br>\n---&gt; 24         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT, self.TIMEOUT_SECS)<br>\n     25         return result['destinationBucket']</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)<br>\n     57                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e<br>\n     58             raise ConnectionError(<br>\n---&gt; 59                 'Connection error trying to communicate with service.') from e<br>\n     60         except HTTPError as e:<br>\n     61             if e.code == 401 or e.code == 403:</p>\n<p>ConnectionError: Connection error trying to communicate with service.</p>\n<p>i do need help asap please .</p>",
      "rawMarkdown": "Hi\nI do have this problem even though the notebook has internet access and i noticed that this happens when the data is bigger than 1 GB , i even tried running the cell couple time as one suggested in this topic\n\nThe trace back i got is :\nHTTPError                                 Traceback (most recent call last)\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)\n     45         try:\n---> 46             with urllib.request.urlopen(req, timeout=timeout) as response:\n     47                 response_json = json.loads(response.read())\n\n/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)\n    221         opener = _opener\n--> 222     return opener.open(url, data, timeout)\n    223 \n\n/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)\n    530             meth = getattr(processor, meth_name)\n--> 531             response = meth(req, response)\n    532 \n\n/opt/conda/lib/python3.7/urllib/request.py in http_response(self, request, response)\n    640             response = self.parent.error(\n--> 641                 'http', request, response, code, msg, hdrs)\n    642 \n\n/opt/conda/lib/python3.7/urllib/request.py in error(self, proto, *args)\n    568             args = (dict, 'default', 'http_error_default') + orig_args\n--> 569             return self._call_chain(*args)\n    570 \n\n/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)\n    502             func = getattr(handler, meth_name)\n--> 503             result = func(*args)\n    504             if result is not None:\n\n/opt/conda/lib/python3.7/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)\n    648     def http_error_default(self, req, fp, code, msg, hdrs):\n--> 649         raise HTTPError(req.full_url, code, msg, hdrs, fp)\n    650 \n\nHTTPError: HTTP Error 502: Bad Gateway\n\nThe above exception was the direct cause of the following exception:\n\nConnectionError                           Traceback (most recent call last)\n<ipython-input-5-7214868af155> in <module>\n----> 1 GCS_PATH1 = KaggleDatasets().get_gcs_path('breast-histopathology-images')\n\n~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)\n     22             'IntegrationType': integration_type,\n     23         }\n---> 24         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT, self.TIMEOUT_SECS)\n     25         return result['destinationBucket']\n\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)\n     57                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e\n     58             raise ConnectionError(\n---> 59                 'Connection error trying to communicate with service.') from e\n     60         except HTTPError as e:\n     61             if e.code == 401 or e.code == 403:\n\nConnectionError: Connection error trying to communicate with service.\n\n\ni do need help asap please .",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1378638,
      "author_name": "babahs",
      "author_url": "",
      "post_date": "07/06/2021 17:15:32",
      "content": "<p>Hi<br>\nI do have this problem even though the notebook has internet access and i noticed that this happens when the data is bigger than 1 GB , i even tried running the cell couple time as one suggested in this topic</p>\n<p>The trace back i got is :<br>\nHTTPError                                 Traceback (most recent call last)<br>\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)<br>\n     45         try:<br>\n---&gt; 46             with urllib.request.urlopen(req, timeout=timeout) as response:<br>\n     47                 response_json = json.loads(response.read())</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)<br>\n    221         opener = _opener<br>\n--&gt; 222     return opener.open(url, data, timeout)<br>\n    223 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)<br>\n    530             meth = getattr(processor, meth_name)<br>\n--&gt; 531             response = meth(req, response)<br>\n    532 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in http_response(self, request, response)<br>\n    640             response = self.parent.error(<br>\n--&gt; 641                 'http', request, response, code, msg, hdrs)<br>\n    642 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in error(self, proto, <em>args)\n    568             args = (dict, 'default', 'http_error_default') + orig_args\n--&gt; 569             return self._call_chain(</em>args)<br>\n    570 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, <em>args)\n    502             func = getattr(handler, meth_name)\n--&gt; 503             result = func(</em>args)<br>\n    504             if result is not None:</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)<br>\n    648     def http_error_default(self, req, fp, code, msg, hdrs):<br>\n--&gt; 649         raise HTTPError(req.full_url, code, msg, hdrs, fp)<br>\n    650 </p>\n<p>HTTPError: HTTP Error 502: Bad Gateway</p>\n<p>The above exception was the direct cause of the following exception:</p>\n<p>ConnectionError                           Traceback (most recent call last)<br>\n in <br>\n----&gt; 1 GCS_PATH1 = KaggleDatasets().get_gcs_path('breast-histopathology-images')</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)<br>\n     22             'IntegrationType': integration_type,<br>\n     23         }<br>\n---&gt; 24         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT, self.TIMEOUT_SECS)<br>\n     25         return result['destinationBucket']</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)<br>\n     57                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e<br>\n     58             raise ConnectionError(<br>\n---&gt; 59                 'Connection error trying to communicate with service.') from e<br>\n     60         except HTTPError as e:<br>\n     61             if e.code == 401 or e.code == 403:</p>\n<p>ConnectionError: Connection error trying to communicate with service.</p>\n<p>i do need help asap please .</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 743150,
      "author_name": "mgorner",
      "author_url": "",
      "post_date": "02/11/2020 20:53:30",
      "content": "<p>That can happen the first time you execute the command. Have you tried running the cell another time?</p>",
      "votes": null,
      "replies": [
        {
          "id": 743755,
          "author_name": "atamazian",
          "author_url": "",
          "post_date": "02/12/2020 09:14:17",
          "content": "<p>Unfortunately, I still have that error.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 744349,
          "author_name": "mgorner",
          "author_url": "",
          "post_date": "02/12/2020 18:57:45",
          "content": "<p>I am glad this was resolved by toggling the \"internet\" switch in the kernel settings to ON. TPUs read data from GCS (Google Cloud Storage). They need access to that.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1117844,
          "author_name": "guptamanish07061999",
          "author_url": "",
          "post_date": "12/18/2020 14:01:29",
          "content": "<p>hey can you please help to do that</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1296842,
          "author_name": "denniswilmsen",
          "author_url": "",
          "post_date": "05/07/2021 14:24:50",
          "content": "<p>Hi! You can find the kernel's internet switch as well as the accelerator under the settings dropdown menu on the right side of your notebook. Verification of your phone number seems mandatory when used for the very first time.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 743390,
      "author_name": "mcollins42",
      "author_url": "",
      "post_date": "02/12/2020 02:47:10",
      "content": "<p>If you are still seeing this error, would you please post the full error message and trace so I can investigate?</p>",
      "votes": null,
      "replies": [
        {
          "id": 743752,
          "author_name": "atamazian",
          "author_url": "",
          "post_date": "02/12/2020 09:13:23",
          "content": "<p><a href=\"https://pastebin.com/c8Yei24Z\">https://pastebin.com/c8Yei24Z</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1117839,
          "author_name": "guptamanish07061999",
          "author_url": "",
          "post_date": "12/18/2020 13:59:29",
          "content": "<p>gaierror                                  Traceback (most recent call last)<br>\n/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)<br>\n   1318                 h.request(req.get_method(), req.selector, req.data, headers,<br>\n-&gt; 1319                           encode_chunked=req.has_header('Transfer-encoding'))<br>\n   1320             except OSError as err: # timeout error</p>\n<p>/opt/conda/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked)<br>\n   1251         \"\"\"Send a complete request to the server.\"\"\"<br>\n-&gt; 1252         self._send_request(method, url, body, headers, encode_chunked)<br>\n   1253 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)<br>\n   1297             body = _encode(body, 'body')<br>\n-&gt; 1298         self.endheaders(body, encode_chunked=encode_chunked)<br>\n   1299 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked)<br>\n   1246             raise CannotSendHeader()<br>\n-&gt; 1247         self._send_output(message_body, encode_chunked=encode_chunked)<br>\n   1248 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked)<br>\n   1025         del self._buffer[:]<br>\n-&gt; 1026         self.send(msg)<br>\n   1027 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in send(self, data)<br>\n    965             if self.auto_open:<br>\n--&gt; 966                 self.connect()<br>\n    967             else:</p>\n<p>/opt/conda/lib/python3.7/http/client.py in connect(self)<br>\n   1413 <br>\n-&gt; 1414             super().connect()<br>\n   1415 </p>\n<p>/opt/conda/lib/python3.7/http/client.py in connect(self)<br>\n    937         self.sock = self._create_connection(<br>\n--&gt; 938             (self.host,self.port), self.timeout, self.source_address)<br>\n    939         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)</p>\n<p>/opt/conda/lib/python3.7/socket.py in create_connection(address, timeout, source_address)<br>\n    706     err = None<br>\n--&gt; 707     for res in getaddrinfo(host, port, 0, SOCK_STREAM):<br>\n    708         af, socktype, proto, canonname, sa = res</p>\n<p>/opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags)<br>\n    751     addrlist = []<br>\n--&gt; 752     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):<br>\n    753         af, socktype, proto, canonname, sa = res</p>\n<p>gaierror: [Errno -3] Temporary failure in name resolution</p>\n<p>During handling of the above exception, another exception occurred:</p>\n<p>URLError                                  Traceback (most recent call last)<br>\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)<br>\n     37         try:<br>\n---&gt; 38             with urllib.request.urlopen(req, timeout=self.TIMEOUT_SECS) as response:<br>\n     39                 response_json = json.loads(response.read())</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)<br>\n    221         opener = _opener<br>\n--&gt; 222     return opener.open(url, data, timeout)<br>\n    223 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)<br>\n    524 <br>\n--&gt; 525         response = self._open(req, data)<br>\n    526 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in _open(self, req, data)<br>\n    542         result = self._call_chain(self.handle_open, protocol, protocol +<br>\n--&gt; 543                                   '_open', req)<br>\n    544         if result:</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, <em>args)\n    502             func = getattr(handler, meth_name)\n--&gt; 503             result = func(</em>args)<br>\n    504             if result is not None:</p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in https_open(self, req)<br>\n   1361             return self.do_open(http.client.HTTPSConnection, req,<br>\n-&gt; 1362                 context=self._context, check_hostname=self._check_hostname)<br>\n   1363 </p>\n<p>/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)<br>\n   1320             except OSError as err: # timeout error<br>\n-&gt; 1321                 raise URLError(err)<br>\n   1322             r = h.getresponse()</p>\n<p>URLError: </p>\n<p>The above exception was the direct cause of the following exception:</p>\n<p>ConnectionError                           Traceback (most recent call last)<br>\n in <br>\n----&gt; 1 GCS_PATH = KaggleDatasets().get_gcs_path()</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)<br>\n     21             'IntegrationType': integration_type,<br>\n     22         }<br>\n---&gt; 23         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT)<br>\n     24         return result['destinationBucket']</p>\n<p>~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)<br>\n     49                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e<br>\n     50             raise ConnectionError(<br>\n---&gt; 51                 'Connection error trying to communicate with service.') from e<br>\n     52         except HTTPError as e:<br>\n     53             if e.code == 401 or e.code == 403:</p>\n<p>ConnectionError: Connection error trying to communicate with service.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 743486,
      "author_name": "msheriey",
      "author_url": "",
      "post_date": "02/12/2020 05:28:33",
      "content": "<p>Or maybe internet is off? 👀 </p>",
      "votes": null,
      "replies": [
        {
          "id": 743756,
          "author_name": "atamazian",
          "author_url": "",
          "post_date": "02/12/2020 09:15:09",
          "content": "<p>Is it possible to work with Kaggle without internet? 🤔 </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 743763,
          "author_name": "msheriey",
          "author_url": "",
          "post_date": "02/12/2020 09:27:18",
          "content": "<p>I meant the kernel's internet access :'D</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 743767,
          "author_name": "atamazian",
          "author_url": "",
          "post_date": "02/12/2020 09:31:50",
          "content": "<p>You were right, it seems that Internet access was turned off in the notebook. I turned it on, and it works now. Thanks!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 744208,
          "author_name": "juliaelliott",
          "author_url": "",
          "post_date": "02/12/2020 16:49:16",
          "content": "<p>Yep, for the TPU integration to work properly, you’ll have to have internet on, which should happen by default when you start up a new notebook with the TPU accelerator.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 744500,
          "author_name": "vimota",
          "author_url": "",
          "post_date": "02/12/2020 22:18:04",
          "content": "<p>Like Julia said, the notebook's internet access should automatically turn on when you enable TPUs (or create a new notebook with TPU). I'd like to figure out why that didn't happen: How did you create the notebook, was it a fork or a brand new notebook? Did you explicitly turn off internet for the notebook?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 745399,
          "author_name": "atamazian",
          "author_url": "",
          "post_date": "02/13/2020 19:30:15",
          "content": "<p>I just forked my notebook from \"Getting started...\" notebook.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "743143": "When I run  `GCS_DS_PATH = KaggleDatasets().get_gcs_path()`, I get \"ConnectionError: Connection error trying to communicate with service.\" Is it just me, or other people have the same problem as well?",
    "743150": "That can happen the first time you execute the command. Have you tried running the cell another time?",
    "743390": "If you are still seeing this error, would you please post the full error message and trace so I can investigate?",
    "743486": "Or maybe internet is off? 👀",
    "743752": "https://pastebin.com/c8Yei24Z",
    "743755": "Unfortunately, I still have that error.",
    "743756": "Is it possible to work with Kaggle without internet? 🤔",
    "743763": "I meant the kernel's internet access :'D",
    "743767": "You were right, it seems that Internet access was turned off in the notebook. I turned it on, and it works now. Thanks!",
    "744208": "Yep, for the TPU integration to work properly, you’ll have to have internet on, which should happen by default when you start up a new notebook with the TPU accelerator.",
    "744349": "I am glad this was resolved by toggling the \"internet\" switch in the kernel settings to ON. TPUs read data from GCS (Google Cloud Storage). They need access to that.",
    "744500": "Like Julia said, the notebook's internet access should automatically turn on when you enable TPUs (or create a new notebook with TPU). I'd like to figure out why that didn't happen: How did you create the notebook, was it a fork or a brand new notebook? Did you explicitly turn off internet for the notebook?",
    "745399": "I just forked my notebook from \"Getting started...\" notebook.",
    "1117839": "gaierror                                  Traceback (most recent call last)\n/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)\n   1318                 h.request(req.get_method(), req.selector, req.data, headers,\n-> 1319                           encode_chunked=req.has_header('Transfer-encoding'))\n   1320             except OSError as err: # timeout error\n\n/opt/conda/lib/python3.7/http/client.py in request(self, method, url, body, headers, encode_chunked)\n   1251         \"\"\"Send a complete request to the server.\"\"\"\n-> 1252         self._send_request(method, url, body, headers, encode_chunked)\n   1253 \n\n/opt/conda/lib/python3.7/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)\n   1297             body = _encode(body, 'body')\n-> 1298         self.endheaders(body, encode_chunked=encode_chunked)\n   1299 \n\n/opt/conda/lib/python3.7/http/client.py in endheaders(self, message_body, encode_chunked)\n   1246             raise CannotSendHeader()\n-> 1247         self._send_output(message_body, encode_chunked=encode_chunked)\n   1248 \n\n/opt/conda/lib/python3.7/http/client.py in _send_output(self, message_body, encode_chunked)\n   1025         del self._buffer[:]\n-> 1026         self.send(msg)\n   1027 \n\n/opt/conda/lib/python3.7/http/client.py in send(self, data)\n    965             if self.auto_open:\n--> 966                 self.connect()\n    967             else:\n\n/opt/conda/lib/python3.7/http/client.py in connect(self)\n   1413 \n-> 1414             super().connect()\n   1415 \n\n/opt/conda/lib/python3.7/http/client.py in connect(self)\n    937         self.sock = self._create_connection(\n--> 938             (self.host,self.port), self.timeout, self.source_address)\n    939         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)\n\n/opt/conda/lib/python3.7/socket.py in create_connection(address, timeout, source_address)\n    706     err = None\n--> 707     for res in getaddrinfo(host, port, 0, SOCK_STREAM):\n    708         af, socktype, proto, canonname, sa = res\n\n/opt/conda/lib/python3.7/socket.py in getaddrinfo(host, port, family, type, proto, flags)\n    751     addrlist = []\n--> 752     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\n    753         af, socktype, proto, canonname, sa = res\n\ngaierror: [Errno -3] Temporary failure in name resolution\n\nDuring handling of the above exception, another exception occurred:\n\nURLError                                  Traceback (most recent call last)\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)\n     37         try:\n---> 38             with urllib.request.urlopen(req, timeout=self.TIMEOUT_SECS) as response:\n     39                 response_json = json.loads(response.read())\n\n/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)\n    221         opener = _opener\n--> 222     return opener.open(url, data, timeout)\n    223 \n\n/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)\n    524 \n--> 525         response = self._open(req, data)\n    526 \n\n/opt/conda/lib/python3.7/urllib/request.py in _open(self, req, data)\n    542         result = self._call_chain(self.handle_open, protocol, protocol +\n--> 543                                   '_open', req)\n    544         if result:\n\n/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)\n    502             func = getattr(handler, meth_name)\n--> 503             result = func(*args)\n    504             if result is not None:\n\n/opt/conda/lib/python3.7/urllib/request.py in https_open(self, req)\n   1361             return self.do_open(http.client.HTTPSConnection, req,\n-> 1362                 context=self._context, check_hostname=self._check_hostname)\n   1363 \n\n/opt/conda/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)\n   1320             except OSError as err: # timeout error\n-> 1321                 raise URLError(err)\n   1322             r = h.getresponse()\n\nURLError: <urlopen error [Errno -3] Temporary failure in name resolution>\n\nThe above exception was the direct cause of the following exception:\n\nConnectionError                           Traceback (most recent call last)\n<ipython-input-8-2cec97546578> in <module>\n----> 1 GCS_PATH = KaggleDatasets().get_gcs_path()\n\n~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)\n     21             'IntegrationType': integration_type,\n     22         }\n---> 23         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT)\n     24         return result['destinationBucket']\n\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint)\n     49                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e\n     50             raise ConnectionError(\n---> 51                 'Connection error trying to communicate with service.') from e\n     52         except HTTPError as e:\n     53             if e.code == 401 or e.code == 403:\n\nConnectionError: Connection error trying to communicate with service.",
    "1117844": "hey can you please help to do that",
    "1296842": "Hi! You can find the kernel's internet switch as well as the accelerator under the settings dropdown menu on the right side of your notebook. Verification of your phone number seems mandatory when used for the very first time.",
    "1378638": "Hi\nI do have this problem even though the notebook has internet access and i noticed that this happens when the data is bigger than 1 GB , i even tried running the cell couple time as one suggested in this topic\n\nThe trace back i got is :\nHTTPError                                 Traceback (most recent call last)\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)\n     45         try:\n---> 46             with urllib.request.urlopen(req, timeout=timeout) as response:\n     47                 response_json = json.loads(response.read())\n\n/opt/conda/lib/python3.7/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)\n    221         opener = _opener\n--> 222     return opener.open(url, data, timeout)\n    223 \n\n/opt/conda/lib/python3.7/urllib/request.py in open(self, fullurl, data, timeout)\n    530             meth = getattr(processor, meth_name)\n--> 531             response = meth(req, response)\n    532 \n\n/opt/conda/lib/python3.7/urllib/request.py in http_response(self, request, response)\n    640             response = self.parent.error(\n--> 641                 'http', request, response, code, msg, hdrs)\n    642 \n\n/opt/conda/lib/python3.7/urllib/request.py in error(self, proto, *args)\n    568             args = (dict, 'default', 'http_error_default') + orig_args\n--> 569             return self._call_chain(*args)\n    570 \n\n/opt/conda/lib/python3.7/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)\n    502             func = getattr(handler, meth_name)\n--> 503             result = func(*args)\n    504             if result is not None:\n\n/opt/conda/lib/python3.7/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)\n    648     def http_error_default(self, req, fp, code, msg, hdrs):\n--> 649         raise HTTPError(req.full_url, code, msg, hdrs, fp)\n    650 \n\nHTTPError: HTTP Error 502: Bad Gateway\n\nThe above exception was the direct cause of the following exception:\n\nConnectionError                           Traceback (most recent call last)\n<ipython-input-5-7214868af155> in <module>\n----> 1 GCS_PATH1 = KaggleDatasets().get_gcs_path('breast-histopathology-images')\n\n~/.local/lib/python3.7/site-packages/kaggle_datasets.py in get_gcs_path(self, dataset_dir)\n     22             'IntegrationType': integration_type,\n     23         }\n---> 24         result = self.web_client.make_post_request(data, self.GET_GCS_PATH_ENDPOINT, self.TIMEOUT_SECS)\n     25         return result['destinationBucket']\n\n~/.local/lib/python3.7/site-packages/kaggle_web_client.py in make_post_request(self, data, endpoint, timeout)\n     57                     'Timeout error trying to communicate with service. Please ensure internet is on.') from e\n     58             raise ConnectionError(\n---> 59                 'Connection error trying to communicate with service.') from e\n     60         except HTTPError as e:\n     61             if e.code == 401 or e.code == 403:\n\nConnectionError: Connection error trying to communicate with service.\n\n\ni do need help asap please ."
  },
  "source": "meta"
}