API/Python SSL errors

Hello, my department has many python scripts that use the smartsheet API to download/upload from the site

all of my smartsheet python (which was working perfectly before today) started giving the following errorurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.smartsheet.com', port=443): Max retries exceeded with url: /2.0/sheets/6233916580358020 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1125)')))haven't had any luck with google, any help would be appreciated

Here’s some example code that gives the error. All it does is download a smartsheet file and save it to the network drive

import smartsheet

import warnings

warnings.simplefilter("ignore")

flPth = '\\\\corp.ourserver.com\\Apps\\FolderName\\'

# Smartsheet Token

st = '[API TOKEN HERE]'

def grab_Cur_SmrtSht(st, flPth):

    smartsheet_client = smartsheet.Smartsheet(st)

    smartsheet_client.Sheets.get_sheet_as_excel(

      6002040949919620,           # sheet_id

      flPth)

grab_Cur_SmrtSht(st, flPth)


————————————

i'm sure the issue is something changed on our company security, I just need something to be able to take them other than "my code stopped working"

Answers