Yorumlar

Sevgi TARGAY
1 yıl 10 ay önce

Hayır çözemedim. Kütüphaneleri zaten import ediyorum pandas numpy vb gibi kütüphaneler çalışıyor. Fakat seaborn kütüphanesini import edip dataset yüklemek istediğimde urlerror diye bir hata alıyorum.

titanic = sns.load_dataset("titanic")

 

URLError                                  Traceback (most recent call last)
Cell In[10], line 1
----> 1 titanic = sns.load_dataset("titanic")

File /lib/python3.10/site-packages/seaborn/utils.py:582, in load_dataset(name, cache, data_home, **kws)
    580 cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))
    581 if not os.path.exists(cache_path):
--> 582     if name not in get_dataset_names():
    583         raise ValueError(f"'{name}' is not one of the example datasets.")
    584     urlretrieve(url, cache_path)

File /lib/python3.10/site-packages/seaborn/utils.py:508, in get_dataset_names()
    502 """Report available example datasets, useful for reporting issues.
    503 
    504 Requires an internet connection.
    505 
    506 """
    507 url = "https://github.com/mwaskom/seaborn-data"
--> 508 with urlopen(url) as resp:
    509     html = resp.read()
    511 pat = r"/mwaskom/seaborn-data/blob/master/(\w*).csv"

File /lib/python3.10/urllib/request.py:216, in urlopen(url, data, timeout, cafile, capath, cadefault, context)
    214 else:
    215     opener = _opener
--> 216 return opener.open(url, data, timeout)

File /lib/python3.10/urllib/request.py:519, in OpenerDirector.open(self, fullurl, data, timeout)
    516     req = meth(req)
    518 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method())
--> 519 response = self._open(req, data)
    521 # post-process response
    522 meth_name = protocol+"_response"

File /lib/python3.10/urllib/request.py:541, in OpenerDirector._open(self, req, data)
    538 if result:
    539     return result
--> 541 return self._call_chain(self.handle_open, 'unknown',
    542                         'unknown_open', req)

File /lib/python3.10/urllib/request.py:496, in OpenerDirector._call_chain(self, chain, kind, meth_name, *args)
    494 for handler in handlers:
    495     func = getattr(handler, meth_name)
--> 496     result = func(*args)
    497     if result is not None:
    498         return result

File /lib/python3.10/urllib/request.py:1419, in UnknownHandler.unknown_open(self, req)
   1417 def unknown_open(self, req):
   1418     type = req.type
-> 1419     raise URLError('unknown url type: %s' % type)

URLError: <urlopen error unknown url type: https>