Spaces:
Running
Running
print for logs
Browse files- validation.py +2 -1
validation.py
CHANGED
@@ -46,6 +46,7 @@ def validate_records(json_data):
|
|
46 |
for record_set in record_sets:
|
47 |
try:
|
48 |
records = dataset.records(record_set=record_set.uuid)
|
|
|
49 |
_ = func_timeout.func_timeout(WAIT_TIME, lambda: next(iter(records)))
|
50 |
results.append(f"β
Record set '{record_set.uuid}' passed validation.")
|
51 |
except func_timeout.exceptions.FunctionTimedOut:
|
@@ -59,5 +60,5 @@ def validate_records(json_data):
|
|
59 |
return True, "\n".join(results)
|
60 |
except Exception as e:
|
61 |
error_details = traceback.format_exc()
|
62 |
-
error_message = f"β Unexpected
|
63 |
return False, error_message
|
|
|
46 |
for record_set in record_sets:
|
47 |
try:
|
48 |
records = dataset.records(record_set=record_set.uuid)
|
49 |
+
print(records)
|
50 |
_ = func_timeout.func_timeout(WAIT_TIME, lambda: next(iter(records)))
|
51 |
results.append(f"β
Record set '{record_set.uuid}' passed validation.")
|
52 |
except func_timeout.exceptions.FunctionTimedOut:
|
|
|
60 |
return True, "\n".join(results)
|
61 |
except Exception as e:
|
62 |
error_details = traceback.format_exc()
|
63 |
+
error_message = f"β Unexpected error during records validation: {str(e)}\n\n{error_details}"
|
64 |
return False, error_message
|