diff --git a/Scripts/check_no_executed_cell.py b/Scripts/check_no_executed_cell.py index 7a91631ca992d1d15e4e44b2419df1dbc26376d6..93ca3dbf6ec23b8926deeb699c634c2d28b8b9b6 100644 --- a/Scripts/check_no_executed_cell.py +++ b/Scripts/check_no_executed_cell.py @@ -1,5 +1,3 @@ -#!python - import argparse import sys from typing import Optional @@ -8,7 +6,7 @@ from typing import Sequence def find_executed_cell(filename): """Read the file and check whether there is a line with "execution_count" and a non null value.""" - stream = open(filename) + stream = open(filename, encoding="utf8", errors='ignore') executed_cells = [line.strip("\n,\" ") for line in stream if "execution_count" in line and "null" not in line ]