Closed scottyhq closed 6 months ago
Hmm, @forrestfwilliams, since you use a Mac, can you look at this?
Hey @scottyhq are you on an Intel or ARM based Mac? This will change our debugging efforts.
@scottyhq I wasn't able to re-create the error you're seeing on my 2021 M1 MacBook Pro.
Just FYI, hyp3-isce2
won't run correctly natively on an ARM platform, because there is no ARM-based version of ISCE2 available on conda-forge.
To get around this, you can set up a pseudo-Intel conda environment for hyp3-isce2
by running the commands below in hyp3-isce2
's home directory:
export CENV_NAME=hyp3-isce2
export CONDA_SUBDIR=osx-64
export OSX_SDK_DIR=/Library/Developer/CommandLineTools/SDKs
conda create -y -n $CENV_NAME
conda activate $CENV_NAME
conda config --env --set subdir osx-64
mamba env update --name $CENV_NAME -f environment.yml
Try installing hyp3-isce2
this way and let me know how it goes.
Also on a 2019 intel. I just followed the development instructions, so maybe it's a version issue with some new build?... no rush on debugging, just wanted to flag it
@scottyhq what MacOS are you running? I'm on Sonoma 14.1 and can't recreate the issue.
Thanks for looking into it @forrestfwilliams, after some frustrating debugging I realized I had GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
set in my terminal (often these days since working mostly with URLs). And Because the ISCE driver seems to require sidecar files even to open new files, gdal unceremoniously exits :(, thus the traceback!
@scottyhq oh, that's handy to know! I set GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
often as well.
The bug
For version 0.9.2. The example workflow fails saving the glo30 DEM in ISCE format running via a conda-install on MacOS. It seems like the conda-forge gdal doesn't have a functional ISCE driver because writing to other formats is fine.
https://github.com/ASFHyP3/hyp3-isce2/blob/5713e162728b9e2b87d8ddc61c2a37de8183b406/src/hyp3_isce2/dem.py#L123-L124
To Reproduce
Additional context
Seems a problem only on MacOS, conda-installs on linux are working fine.