nathanael-fijalkow commited on
Commit
ebf8aa8
·
1 Parent(s): 38d2a61

improved debug

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -178,7 +178,14 @@ def evaluate_submission(file_obj, debug=False):
178
  spec = importlib.util.spec_from_file_location(module_name, file_path)
179
  student_module = importlib.util.module_from_spec(spec)
180
  sys.modules[module_name] = student_module
181
- spec.loader.exec_module(student_module)
 
 
 
 
 
 
 
182
 
183
  report = [f"## Results:\n"]
184
 
 
178
  spec = importlib.util.spec_from_file_location(module_name, file_path)
179
  student_module = importlib.util.module_from_spec(spec)
180
  sys.modules[module_name] = student_module
181
+
182
+ try:
183
+ spec.loader.exec_module(student_module)
184
+ except Exception as e:
185
+ print(f"ERROR during module exec: {type(e).__name__}: {str(e)}")
186
+ import traceback
187
+ traceback.print_exc()
188
+ raise
189
 
190
  report = [f"## Results:\n"]
191