diff --git a/observe_export/observe_export.py b/observe_export/observe_export.py index 7b1d420..966e6c8 100644 --- a/observe_export/observe_export.py +++ b/observe_export/observe_export.py @@ -585,9 +585,9 @@ def get_crawling_command(start_time: datetime, end_time: datetime, output_file: f"Was expecting to find exactly one csv file with the correctness data but found multiple: {files_downloaded}") correctness_file = files_downloaded[0] if crawling_format == Format.CSV: - expected_number_of_lines = pd.read_csv(correctness_file, header=0)["count"][0] + expected_number_of_lines = pd.read_csv(correctness_file, header=0)["count"].get(0, 0) else: - expected_number_of_lines = pd.read_json(correctness_file, lines=True)["count"][0] + expected_number_of_lines = pd.read_json(correctness_file, lines=True)["count"].get(0, 0) _, number_of_lines_exported = get_first_line_and_line_count(main_result_file) if expected_number_of_lines == number_of_lines_exported: print("\tCompleteness check passed!\n\t\t all rows were exported!")