From 8c646a53224fdffec0c75a06f102044db75535b7 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 1 Jun 2025 22:13:22 +0000 Subject: [PATCH] touch geojson file to ensure it exists before opening to write --- crawler/ui_exporter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crawler/ui_exporter.py b/crawler/ui_exporter.py index 46d1d5b..d18944e 100644 --- a/crawler/ui_exporter.py +++ b/crawler/ui_exporter.py @@ -12,6 +12,7 @@ async def export_immoweb( ): data_dir = ctx.obj["data_dir"] output_file_path = pathlib.Path(output_file) + output_file_path.touch(exist_ok=True) listing_paths = sorted(list(pathlib.Path(data_dir).glob("*/listing.json"))) # listing_paths = listing_paths[:10] listings = Listing.get_all_listings([str(path) for path in listing_paths])