From 513c474c970471c0f9ee10dde8679e0a8d08bb22 Mon Sep 17 00:00:00 2001 From: Liam Toney Date: Sun, 29 Mar 2026 18:32:58 -0600 Subject: [PATCH 1/2] Update yaml file --- environment.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 0ebe0c2..2407fe0 100644 --- a/environment.yml +++ b/environment.yml @@ -1,10 +1,9 @@ name: uafinfra channels: - conda-forge - - defaults dependencies: - - python<3.11 # Temporary fix (see https://github.com/numba/numba/issues/8304) - - fastkml<1 + - python<3.11 # This is required to avoid "setting array with sequence error" + - fastkml - ipython - obspy - numba From e5c872365d02d9c532013c4db0403e4b81c85ad4 Mon Sep 17 00:00:00 2001 From: Liam Toney Date: Sun, 29 Mar 2026 18:44:13 -0600 Subject: [PATCH 2/2] Bonus: Fix the KML reading function for the newer FastKML --- array_processing/tools/array_characterization.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/array_processing/tools/array_characterization.py b/array_processing/tools/array_characterization.py index e2b35b3..ae2272e 100644 --- a/array_processing/tools/array_characterization.py +++ b/array_processing/tools/array_characterization.py @@ -484,12 +484,10 @@ def read_kml(kml_file): """ # Read in KML file - k = kml.KML() - with open(kml_file, mode='rb') as f: - k.from_string(f.read()) + k = kml.KML.parse(kml_file, validate=False) # Extract coordinates - elements = list(list(list(k.features())[0].features())[0].features()) + elements = k.features[0].features[0].features lonlist = [element.geometry.x for element in elements] latlist = [element.geometry.y for element in elements]