GerardCB commited on
Commit
6414190
·
1 Parent(s): c6a9e71

Fix: Ensure directories exist in download script

Browse files
backend/scripts/download_hdx_panama.py CHANGED
@@ -71,6 +71,9 @@ def download_and_extract_hdx(dataset_name, url, description):
71
  else:
72
  # Default behavior
73
  geojson_path = output_dir / f"{dataset_name}.geojson"
 
 
 
74
 
75
  with open(geojson_path, 'wb') as f:
76
  f.write(response.content)
 
71
  else:
72
  # Default behavior
73
  geojson_path = output_dir / f"{dataset_name}.geojson"
74
+
75
+ # Ensure directory exists (critical for Docker build)
76
+ output_dir.mkdir(parents=True, exist_ok=True)
77
 
78
  with open(geojson_path, 'wb') as f:
79
  f.write(response.content)