title: SSLError( '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),)) in Python while accessing an url
body: <p>I am writing a script that will will update a macro enabled Excel file that is present in a given url.<strong>I am using Python3.6 for this work.</strong> I decided it to first download in a local copy then update the local copy and after updating push it back to the same url. But when I am writing code to download the file I am getting the error as-</p>
  
  <blockquote>
    <p>(Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))</p>
  </blockquote>
  
  <p>the code that I am using is-</p>
  
  <pre><code>import requests
  
  url = 'https://sharepoint.amr.ith.intel.com/sites/SKX/patchboard/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2Fsites%2FSKX%2Fpatchboard%2FShared%20Documents%2FReleaseInfo&amp;FolderCTID=0x0120004C1C8CCA66D8D94FB4D7A0D2F56A8DB7&amp;View={859827EF-6A11-4AD6-BD42-23F385D43AD6}/Copy of Patch_Release_Utilization'
  r = requests.get(url)
  open('Excel.xlsm', 'wb').write(r.content)
  </code></pre>
  
  <p>I have tried solution given in-<a href="https://stackoverflow.com/questions/46604114/python-requests-ssl-error-certificate-verify-failed">Python requests SSL error - certificate verify failed</a>
  ,but this is not working for me. How to resolve this problem?? Please help me with the solution if somebody has already tackled it.</p>
  
  <blockquote>
    <p>EDIT:</p>
  </blockquote>
  
  <p>I have tried using-</p>
  
  <pre><code>r=request.get(url,verify=False)
  </code></pre>
  
  <p>After doing this I am getting the warning as - "InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: <a href="https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings" rel="nofollow noreferrer">https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings</a>" and also when I am trying to open the "Excel.xlsm" file so created I am getting the error message as- <strong>"Excel cannot open the file "Excel.xlsm" because the file format or file extensionis not valid.Verify that the file has not been corrupted and that the file extension matches the format of trhe file</strong>"</p>
  
  <p><strong>NOTE- I am trying to access the macro enabled Excel file(.xlsm) file</strong></p>