I'm getting an error:
'IndexError: list index out of range' for a sys.argv[1] command.
I recognize that sys.argv[0] will give me the name of my file, and in this if-elif-else conditional loop, it clearly routes itself to else, which is undesirable in my current application.
if sys.argv[1] == "train.txt":
print_data(e2e_train_src, e2e_train_tgt)
elif sys.argv[1] == "valid.txt":
print_data(e2e_val_src, e2e_val_tgt)
else:
assert False
I expect the data to print, but it is not the case.