Skip to content

Commit 6eca271

Browse files
authored
Merge pull request #129 from AfricasVoices/fix-jsonl-new-lines
Fix new lines missing from jsonl exports
2 parents 553ae92 + a43f8d6 commit 6eca271

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rapid_pro_tools/rapid_pro_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def export_all_data(self, export_dir_path):
817817
for batch in export_func().iterfetches(retry_on_rate_exceed=True):
818818
for item in batch:
819819
items_exported += 1
820-
f.write(json.dumps(item.serialize()))
820+
f.write(json.dumps(item.serialize()) + "\n")
821821
log.info(f"Done. Exported {items_exported} {endpoint}")
822822

823823
# Now handle the special cases...
@@ -834,7 +834,7 @@ def export_all_data(self, export_dir_path):
834834
log.info(f"Exporting {endpoint}, including those in archives, to {export_file_path}...")
835835
items_exported = 0
836836
for item in export_func():
837-
f.write(json.dumps(item.serialize()))
837+
f.write(json.dumps(item.serialize()) + "\n")
838838
items_exported += 1
839839
log.info(f"Done. Exported {items_exported} {endpoint}")
840840

0 commit comments

Comments
 (0)