import seaborn as sns
titanic=sns.load_dataset('titanic')
TimeoutError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.9/urllib/request.py in do_open(self, http_class, req, **http_conn_args) 1345 try: -> 1346 h.request(req.get_method(), req.selector, req.data, headers, 1347 encode_chunked=req.has_header('Transfer-encoding'))
~/opt/anaconda3/lib/python3.9/http/client.py in request(self, method, url, body, headers, encode_chunked)1284 """Send a complete request to the server."""-> 1285 self._send_request(method, url, body, headers, encode_chunked)1286
~/opt/anaconda3/lib/python3.9/http/client.py in _send_request(self, method, url, body, headers, encode_chunked) 1330 body = _encode(body, 'body') 1331 self.endheaders(body, encode_chunked=encode_chunked) 1332
~/opt/anaconda3/lib/python3.9/http/client.py in endheaders(self, message_body, encode_chunked) 1279 raise CannotSendHeader() 1280 self._send_output(message_body, encode_chunked=encode_chunked) 1281
~/opt/anaconda3/lib/python3.9/http/client.py in _send_output(self, message_body, encode_chunked) 1039 del self._buffer[:] 1040 self.send(msg) 1041
~/opt/anaconda3/lib/python3.9/http/client.py in send(self, data) 979 if self.auto_open: 980 self.connect() 981 else:
~/opt/anaconda3/lib/python3.9/http/client.py in connect(self) 1446 1447 super().connect() 1448
~/opt/anaconda3/lib/python3.9/http/client.py in connect(self) 945 """Connect to the host and port specified in init.""" 946 self.sock = self._create_connection( 947 (self.host,self.port), self.timeout, self.source_address)
~/opt/anaconda3/lib/python3.9/socket.py in create_connection(address, timeout, source_address) 843 try: 844 raise err 845 finally:
~/opt/anaconda3/lib/python3.9/socket.py in create_connection(address, timeout, source_address) 831 sock.bind(source_address) 832 sock.connect(sa) 833 # Break explicitly a reference cycle
TimeoutError: [Errno 60] Operation timed out
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last) /var/folders/7v/5_bfsn0x0xbdx1w5zzv68lwr0000gn/T/ipykernel_6934/3828376077.py in <module> 1 titanic=sns.load_dataset('titanic')
~/opt/anaconda3/lib/python3.9/site-packages/seaborn/utils.py in load_dataset(name, cache, data_home, **kws) 594 if name not in get_dataset_names(): 595 raise ValueError(f"'{name}' is not one of the example datasets.") 596 urlretrieve(url, cache_path) 597 full_path = cache_path 598 else:
~/opt/anaconda3/lib/python3.9/urllib/request.py in urlretrieve(url, filename, reporthook, data) 237 url_type, path = _splittype(url) 238 239 with contextlib.closing(urlopen(url, data)) as fp: 240 headers = fp.info() 241
~/opt/anaconda3/lib/python3.9/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 212 else: 213 opener = _opener 214 return opener.open(url, data, timeout) 215 216 def install_opener(opener):
~/opt/anaconda3/lib/python3.9/urllib/request.py in open(self, fullurl, data, timeout) 515 516 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method()) 517 response = self._open(req, data) 518 519 # post-process response
~/opt/anaconda3/lib/python3.9/urllib/request.py in _open(self, req, data) 532 533 protocol = req.type 534 result = self._call_chain(self.handle_open, protocol, protocol + 535 '_open', req) 536 if result:
~/opt/anaconda3/lib/python3.9/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args) 492 for handler in handlers: 493 func = getattr(handler, meth_name) 494 result = func(*args) 495 if result is not None: 496 return result
~/opt/anaconda3/lib/python3.9/urllib/request.py in https_open(self, req) 1387 1388 def https_open(self, req): 1389 return self.do_open(http.client.HTTPSConnection, req, 1390 context=self._context, check_hostname=self._check_hostname) 1391
~/opt/anaconda3/lib/python3.9/urllib/request.py in do_open(self, http_class, req, **http_conn_args) 1347 encode_chunked=req.has_header('Transfer-encoding')) 1348 except OSError as err: # timeout error 1349 raise URLError(err) 1350 r = h.getresponse() 1351 except:
URLError: <urlopen error [Errno 60] Operation timed out>
How do i fix this?
I have never faced an issue before. This is a new laptop. Mac to be precise. I previously only used Windows