HHousen / TransformerSum

Exception caught is very general PYL-W0703
Anti-pattern
Major
3 years ago3 years old
Catching too general exception Exception
 318                        truncation=True,
 319                    )
 320                    articles_encoded_step.append(article_encoded)
 321                except Exception:  # skipcq: FLK-E722 322                    print("Failed to tokenize article: {}".format(article))
 323                    sys.exit(1)
 324
Catching too general exception Exception
182        line_str = linecache.getline(file_path, linecache_index).rstrip("\n")
183        try:
184            line_json = json.loads(line_str)
185        except Exception:186            print("** JSON Loading Error **")
187            print(file_path)
188            print(index)