DatePickerRange to load files and update dashTable

Hello, I have a few files(csv) with logged date as file names. When a user selects the range of dates , the files within that range should be concatenated and displayed as a table. The files may not be logged on all the dates.
I have tried several methods and below i have attached my code. I am not getting any errors but the code is jumping to exception, without entering the for loop.
Am I doing something wrong here? Any help would be appreciated.

def generate_table(dataframe):
trace=dash_table.DataTable(
id=‘table’,
columns=[{“name”: i, “id”: i} for i in dataframe.columns],
style_header={‘textAlign’:‘left’,‘backgroundColor’: ‘rgb(150, 150, 150)’},
style_cell={
‘textAlign’:‘left’,
},
data=dataframe.to_dict(‘records’),
)
return trace

@app.callback(
Output(‘table-container’, ‘children’),
[Input(‘my-date-picker-range’, ‘start_date’),
Input(‘my-date-picker-range’, ‘end_date’)])

def update_table(start_date,end_date):
try:
datasets=[]
if start_date is not None:
start_date = dt.strptime(start_date, ‘%Y-%m-%d’)
start_date_string = start_date.strftime(’%Y_%m_%d’)
if end_date is not None:
end_date = dt.strptime(end_date, ‘%Y-%m-%d’)
end_date_string = end_date.strftime(’%Y_%m_%d’)
for date in range(start_date_string,end_date_string):
path= (‘C:\\\\\log’+ date +’.csv’)
if path==None:
break
df = pd.read_csv(path,index_col=False,delimiter=’;’,low_memory=False)
datasets.append(df)
frames=pd.concat(datasets)
return generate_table(frames)

Thankyou:)