PolarGeospatialCenter / imagery_utils

Other
34 stars 10 forks source link

Fix `ElementTree.getiterator()` call, removed in Python 3.8 #57

Closed ehusby closed 2 years ago

ehusby commented 2 years ago

Call was deprecated since Python 3.2: https://bugs.python.org/issue29209

ehusby commented 2 years ago

This fix is needed for running pgc_ortho.py on old Ikonos imagery (which uses the ElementTree library for parsing its metadata) in an environment with Python 3.8+.

I tested that this change is backwards compatible with at least the Python 3.7.12 that I have in my conda env on Nunatak. But since the old call was deprecated since Python 3.2 (and deprecated in Python 2.7), this is probably not a problem for anyone.