nastasiasnk commited on
Commit
0cb3560
1 Parent(s): 4e4e55b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -4
app.py CHANGED
@@ -111,11 +111,24 @@ account = get_default_account()
111
  CLIENT.authenticate_with_token(token=speckleToken)
112
 
113
 
114
- streamDistanceMatrices = speckle_utils.getSpeckleStream(streamId,branch_name_dm,CLIENT, commit_id_dm)
115
- matrices = fetchDistanceMatrices (stream_distance_matrices)
116
- df_dm = distance_matrices[dm_activityNodes]
117
- dm_dictionary = df_dm.to_dict('index')
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
 
121
 
 
111
  CLIENT.authenticate_with_token(token=speckleToken)
112
 
113
 
 
 
 
 
114
 
115
+ import logging
116
+
117
+ # Set up basic configuration for logging
118
+ logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
119
+
120
+ # Log detailed debug information at critical steps or just before a line where you suspect the error might occur
121
+ logging.debug('About to start a potentially problematic operation...')
122
+ try:
123
+ # Potentially problematic code
124
+ streamDistanceMatrices = speckle_utils.getSpeckleStream(streamId,branch_name_dm,CLIENT, commit_id_dm)
125
+ matrices = fetchDistanceMatrices (stream_distance_matrices)
126
+ df_dm = distance_matrices[dm_activityNodes]
127
+ dm_dictionary = df_dm.to_dict('index')
128
+
129
+ except Exception as e:
130
+ logging.error(f"An error occurred: {e}")
131
+ raise
132
 
133
 
134