jingze_cheng 8 месяцев назад
Родитель
Сommit
b886f8c9c9
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      cores/post_decorators.py

+ 3 - 1
cores/post_decorators.py

@@ -31,7 +31,9 @@ def rule2_decorator(f, *args, **kwargs):
     '''
     predict_line = args[1]
     predict_line = f(*args, **kwargs)
-    idx = predict_line.index('')
+    idx = 0
+    if '' in predict_line:
+        idx = predict_line.index('')
     try:
         if idx == 1:
             if '化合物' in predict_line[0]: