Skip to content

Commit

Permalink
Merge pull request #31 from NASA-IMPACT/fix/et_parse
Browse files Browse the repository at this point in the history
Use string representation of Path compatiblie with lxml 3.6.0.
  • Loading branch information
sharkinsspatial authored Aug 7, 2024
2 parents d141841 + b525de2 commit f23cd03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hls_vi/generate_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def generate_metadata(input_dir: Path, output_dir: Path) -> None:
to this directory with the name `HLS-VI.*.cmr.xml`.
"""
metadata_path = next(input_dir.glob("HLS.*.cmr.xml"))
tree = ET.parse(metadata_path, None)
tree = ET.parse(str(metadata_path))

with rasterio.open(next(output_dir.glob("*.tif"))) as vi_tif:
sensing_times = [t.strip() for t in vi_tif.tags()["SENSING_TIME"].split(";")]
Expand Down

0 comments on commit f23cd03

Please sign in to comment.