From c6a72708115fbbb07984bb0de74fb7c4b78e7a0b Mon Sep 17 00:00:00 2001 From: sungchura Date: Sat, 24 Jun 2023 01:06:24 -0700 Subject: [PATCH] Fix the index out of bounds bug in extract_feature_print.py (#560) Check if the length of sys.argv is 6, instead of 5, to cover sys.argv[5]. Otherwise when the length is 6, it runs the else body and tries to access sys.argv[6] in line 13, which is an error. --- extract_feature_print.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract_feature_print.py b/extract_feature_print.py index 9cc5f06..9b9fdc2 100644 --- a/extract_feature_print.py +++ b/extract_feature_print.py @@ -3,7 +3,7 @@ import os, sys, traceback # device=sys.argv[1] n_part = int(sys.argv[2]) i_part = int(sys.argv[3]) -if len(sys.argv) == 5: +if len(sys.argv) == 6: exp_dir = sys.argv[4] version = sys.argv[5] else: