Skip to content

Commit

Permalink
handle index out of range error
Browse files Browse the repository at this point in the history
  • Loading branch information
nandajavarma committed Aug 20, 2024
1 parent 9521929 commit 925f607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def read_vocab(vocab_file):
with open(vocab_file) as f:
for l in f:
l = l.rstrip('\n')
vocab_list = l.split()
vocab_list = l.rsplit(maxsplit=1)
if len(vocab_list) <= 2:
print("Couldn't split the line:", l)
continue
Expand Down

0 comments on commit 925f607

Please sign in to comment.