Skip to content

Commit

Permalink
Merge pull request #1873 from mozilla/error-message
Browse files Browse the repository at this point in the history
Prettier error message to the terminal when alphabets are mis-matched.
  • Loading branch information
JRMeyer authored Feb 12, 2019
2 parents cef8337 + 32bf1a6 commit c8b1e71
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions util/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@ def label_from_string(self, string):
return self._str_to_label[string]
except KeyError as e:
raise KeyError(
'''
ERROR: You have characters in your transcripts
which do not occur in your data/alphabet.txt
file. Please verify that your alphabet.txt
contains all neccessary characters. Use
util/check_characters.py to see what characters are in
your train / dev / test transcripts.
'''
'''ERROR: Your transcripts contain characters which do not occur in data/alphabet.txt! Use util/check_characters.py to see what characters are in your {train,dev,test}.csv transcripts, and then add all these to data/alphabet.txt.'''
).with_traceback(e.__traceback__)
sys.exit()

Expand Down

0 comments on commit c8b1e71

Please sign in to comment.