Skip to content

Commit ece5dd2

Browse files
Update loc_file_manager.py
Enhanced the JSON validation error dialogs for Localization file manager by appending modality-specific Hugging Face download links to guide users to the correct dataset formats.
1 parent eed97ed commit ece5dd2

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

annotation_tool/controllers/localization/loc_file_manager.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,18 @@ def load_project(self, data, file_path):
6767
if not is_valid:
6868
if len(error_msg) > 800:
6969
error_msg = error_msg[:800] + "\n... (truncated)"
70+
error_text = (
71+
"Critical errors found in JSON. Load aborted.\n\n"
72+
f"{error_msg}\n\n"
73+
"--------------------------------------------------\n"
74+
"💡 Please download the correct Localization JSON format from:\n"
75+
"https://huggingface.co/datasets/OpenSportsLab/soccernetpro-localization-snbas"
76+
)
77+
7078
QMessageBox.critical(
7179
self.main,
7280
"Validation Error",
73-
"Critical errors found in JSON. Load aborted.\n\n" + error_msg,
81+
error_text,
7482
)
7583
return False
7684

0 commit comments

Comments
 (0)