Skip to content

Commit

Permalink
Update error message of file not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
offchan42 committed May 12, 2018
1 parent 07d3eb8 commit 6f78b0b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ def draw_plot_func(dictionary, n_classes, window_title, plot_title, x_label, out
file_id = os.path.basename(os.path.normpath(file_id))
# check if there is a correspondent predicted objects file
if not os.path.exists('predicted/' + file_id + ".txt"):
error("Error. File not found: predicted/" + file_id + ".txt\nYou can check extra/intersect-gt-and-pred.py script for help.")
error_msg = "Error. File not found: predicted/" + file_id + ".txt\n"
error_msg += "(You can avoid this error message by running extra/intersect-gt-and-pred.py)"
error(error_msg)
lines_list = file_lines_to_list(txt_file)
# create ground-truth dictionary
bounding_boxes = []
Expand Down Expand Up @@ -375,7 +377,9 @@ def draw_plot_func(dictionary, n_classes, window_title, plot_title, x_label, out
file_id = os.path.basename(os.path.normpath(file_id))
if class_index == 0:
if not os.path.exists('ground-truth/' + file_id + ".txt"):
error("Error. File not found: ground-truth/" + file_id + ".txt\nYou can check extra/intersect-gt-and-pred.py script for help.")
error_msg = "Error. File not found: ground-truth/" + file_id + ".txt\n"
error_msg += "(You can avoid this error message by running extra/intersect-gt-and-pred.py)"
error(error_msg)
lines = file_lines_to_list(txt_file)
for line in lines:
try:
Expand Down

0 comments on commit 6f78b0b

Please sign in to comment.