Skip to content

Commit

Permalink
Fix s3 not recognized as valid url
Browse files Browse the repository at this point in the history
  • Loading branch information
vikineema committed Dec 4, 2023
1 parent 7f53ae5 commit 06f3a3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deafrica_conflux/cli/rasterise_polygons.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def rasterise_polygons(
try:
polygons_gdf = gpd.read_parquet(polygons_file_path).to_crs(crs)
except Exception:
# One of the odc packages removes s3 as a valid url.
if "s3" not in gpd.io.file._VALID_URLS:
gpd.io.file._VALID_URLS.add("s3")
_log.info("Polygons vector file is not a parquet file")
try:
polygons_gdf = gpd.read_file(polygons_file_path).to_crs(crs)
Expand Down

0 comments on commit 06f3a3d

Please sign in to comment.