File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,11 @@ def display_click_data(clickData, df):
4242 return 'No date selected'
4343 # select the dataset
4444 sdf = df [df ['year_month_day' ] == date ]
45- return ut .get_text_from_subset_df (sdf )
45+ try :
46+ text_to_return = ut .get_text_from_subset_df (sdf )
47+ except :
48+ text_to_return = 'Error retrieving data'
49+ return text_to_return
4650
4751# # Update the performance figure
4852# @app.callback(
@@ -60,6 +64,8 @@ def update_performance_figure(clickData, df):
6064 sdf = dft .get_performance_through_trials (sdf , window = 50 )
6165 # find the index of the session changes and add as vertical lines to the performance plot
6266 session_changes = sdf [sdf .session != sdf .session .shift (1 )].index
67+ if "stimulus_modality" not in sdf .columns :
68+ sdf ['stimulus_modality' ] = 'unknown'
6369 fig = px .scatter (
6470 sdf ,
6571 x = 'total_trial' ,
You can’t perform that action at this time.
0 commit comments