title: problem with code in Pycharm - CERTIFICATE_VERIFY_FAILED
body: <p>I work on windows 7</p>
  
  <p>this is my code</p>
  
  <pre><code>def Rup(x, y, w):
      odleglosc = np.dot(x,w)-y
      cost = np.sum(odleglosc**2) / (2*np.shape(x)[0])
      return odleglosc, cost
  
  def REG(data_1, data_2, data_3, Tu, cou):
  
      i = 0
      while i &lt; cou:
          dif, cost = Rup(data_1, data_2, data_3)
          grad = np.dot(data_1.transpose(), dif) / np.shape(data_1)[0]
          data_3 = data_3 - Tu * grad
          if i%200==0:
              print('Wyliczony error w ' + str(i) + " iteracji: ", cost)
          i+=1;
      return data_3
  
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  from sklearn.preprocessing import LabelEncoder
  
  _DANE = 'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data';
  
  iris = pd.read_csv(_DANE, names=['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'label'])
  le = LabelEncoder()
  iris['label'] = le.fit_transform(iris['label'])
  X = np.array(iris.drop(['petal_width'], axis=1))
  y = np.array(iris['petal_width'])
  iris.head()
  
  cros = 1/1000
  coun= 10000
  _, features = np.shape(X)
  wagi = np.zeros(features)
  wektor = REG(X, y, wagi, cros, coun)
  print('--------------------------------------------------')
  print(wektor)
  print('--------------------------------------------------')
  dif, cost = Rup(X, y, wektor)
  print('Szukany Error', cost)
  </code></pre>
  
  <p>the error message looks as follows</p>
  
  <p>Traceback (most recent call last):</p>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\urllib\request.py", line 1319, in do_open</p>
  
  <pre><code>h.request(req.get_method(), req.selector, req.data, headers,
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1230, in request</p>
  
  <pre><code>self._send_request(method, url, body, headers, encode_chunked)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1276, in _send_request</p>
  
  <pre><code>self.endheaders(body, encode_chunked=encode_chunked)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1225, in endheaders</p>
  
  <pre><code>self._send_output(message_body, encode_chunked=encode_chunked)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1004, in _send_output</p>
  
  <pre><code>self.send(msg)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 944, in send</p>
  
  <pre><code>self.connect()
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1399, in connect</p>
  
  <pre><code>self.sock = self._context.wrap_socket(self.sock,
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\ssl.py", line 500, in wrap_socket</p>
  
  <pre><code>return self.sslsocket_class._create(
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\ssl.py", line 1040, in _create
      self.do_handshake()</p>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\ssl.py", line 1309, in do_handshake</p>
  
  <pre><code>self._sslobj.do_handshake()
  </code></pre>
  
  <p>ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)</p>
  
  <p>During handling of the above exception, another exception occurred:</p>
  
  <p>Traceback (most recent call last):</p>
  
  <p>File "C:/Users/lukasz/PycharmProjects/miw/test.py", line 26, in </p>
  
  <pre><code>iris = pd.read_csv(_DANE, names=['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'label'])
  </code></pre>
  
  <p>File "C:\Users\lukasz\PycharmProjects\miw\venv\lib\site-packages\pandas\io\parsers.py", line 685, in parser_f</p>
  
  <pre><code>return _read(filepath_or_buffer, kwds)
  </code></pre>
  
  <p>File "C:\Users\lukasz\PycharmProjects\miw\venv\lib\site-packages\pandas\io\parsers.py", line 439, in _read</p>
  
  <pre><code>fp_or_buf, _, compression, should_close = get_filepath_or_buffer(
  </code></pre>
  
  <p>File "C:\Users\lukasz\PycharmProjects\miw\venv\lib\site-packages\pandas\io\common.py", line 196, in get_filepath_or_buffer</p>
  
  <pre><code>req = urlopen(filepath_or_buffer)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\urllib\request.py", line 222, in urlopen</p>
  
  <pre><code>return opener.open(url, data, timeout)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\urllib\request.py", line 525, in open</p>
  
  <pre><code>response = self._open(req, data)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\urllib\request.py", line 542, in _open</p>
  
  <pre><code>result = self._call_chain(self.handle_open, protocol, protocol +
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\urllib\request.py", line 502, in _call_chain</p>
  
  <pre><code>result = func(*args)
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\urllib\request.py", line 1362, in https_open</p>
  
  <pre><code>return self.do_open(http.client.HTTPSConnection, req,
  </code></pre>
  
  <p>File "C:\Users\lukasz\AppData\Local\Programs\Python\Python38-32\lib\urllib\request.py", line 1322, in do_open</p>
  
  <pre><code>raise URLError(err)
  </code></pre>
  
  <p>urllib.error.URLError: </p>
  
  <p>Process finished with exit code 1</p>
  
  <p>with the code should be all right because it works correctly on the pages of the online compiler</p>
  
  <p>I don't know how to deal with this problem</p>
  
  <p>please help me</p>