-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with python3.10 #458
Comments
See isce-framework#458 for detailed description of issue addressed here in the Readme
See isce-framework#458 for detailed description of issue addressed here in the Readme
While I suggested a change to the readme in PR #459 , we need to also impose a hard constraint for now in the conda distribution, with which I experienced these issues |
I pushed a commit to #424 to try to fix this, can you try again on that branch and see if it works now? |
I got the similar dem.py -a stitch -b 37 40 -119 -114 -r -s 1 -c
...
API open (WR): demLat_N37_N40_Lon_W119_W114.dem.wgs84
Traceback (most recent call last):
File "/home/zyunjun/tools/miniconda3/envs/insar/lib/python3.10/site-packages/isce/applications/dem.py", line 171, in <module>
sys.exit(main())
File "/home/zyunjun/tools/miniconda3/envs/insar/lib/python3.10/site-packages/isce/applications/dem.py", line 141, in main
demImg = ds.correct()
File "/home/zyunjun/tools/miniconda3/envs/insar/lib/python3.10/site-packages/isce/components/contrib/demUtils/DemStitcher.py", line 862, in correct
return cg(image,conversionType) if image else cg(self._image,conversionType)
File "/home/zyunjun/tools/miniconda3/envs/insar/lib/python3.10/site-packages/isce/components/contrib/demUtils/Correct_geoid_i2_srtm.py", line 182, in __call__
self.correct_geoid_i2_srtm()
File "/home/zyunjun/tools/miniconda3/envs/insar/lib/python3.10/site-packages/isce/components/contrib/demUtils/Correct_geoid_i2_srtm.py", line 196, in correct_geoid_i2_srtm
self.setState()
File "/home/zyunjun/tools/miniconda3/envs/insar/lib/python3.10/site-packages/isce/components/contrib/demUtils/Correct_geoid_i2_srtm.py", line 239, in setState
correct_geoid_i2_srtm.setGeoidFilename_Py(self.geoidFilename)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats I tried to add API open (R): ./demLat_N37_N40_Lon_W119_W114.dem
API close: ./demLat_N37_N40_Lon_W119_W114.dem
Writing geotrans to VRT for ./demLat_N37_N40_Lon_W119_W114.dem
GDAL open (R): ./demLat_N37_N40_Lon_W119_W114.dem.vrt
API open (WR): demLat_N37_N40_Lon_W119_W114.dem.wgs84
Segmentation fault |
I hit this problem with a Python 3.10 installed by Anaconda also. Is there a way to define the required |
If you're using cmake, you can try |
I ran into this problem in the NISAR On-demand system where the environment setup notebook installs ISCE2 (and ISCE3) with Anaconda and a |
@yunjunz I think I figured out why you're getting a segfault here. Python3.10 changed the size type, so any time we use PyArg_ParseTuple with a 's#' argument we need to change the result var from an --- a/contrib/demUtils/correct_geoid_i2_srtm/bindings/correct_geoid_i2_srtmmodule.cpp
+++ b/contrib/demUtils/correct_geoid_i2_srtm/bindings/correct_geoid_i2_srtmmodule.cpp
@@ -172,12 +172,13 @@ PyObject * setConversionType_C(PyObject* self, PyObject* args)
PyObject * setGeoidFilename_C(PyObject* self, PyObject* args)
{
char * varChar;
- int var;
+ Py_ssize_t var;
if(!PyArg_ParseTuple(args, "s#", &varChar ,&var))
{
return NULL;
}
- setGeoidFilename_f(varChar,&var);
+ int ivar = var;
+ setGeoidFilename_f(varChar, &ivar);
return Py_BuildValue("i", 0);
} I'll try to fix the other occurrences of this in isce2 to hopefully get us working with python 3.10. |
Thank you for fixing @rtburns-jpl. I was trying to test it, but there is a problem while downloading SRTM from the USGS website, so I could not confirm if the fix works or not. |
Yeh, @yunjunz, right now, it shows an URL error for me
|
That's unfortunate. I thought this was a temporary outage but maybe their download url format has changed? Should we open a separate issue for that? |
If they changed the SRTM download URLs, then I would recommend a new issue. I was going to open one earlier this week but then it worked for me again at least once. I did not find any announcements about changes but they tend to change it about every two years. |
A recently updated thread regarding the connectivity issues: |
Hi sisi-ali, Yes, we are all getting similar errors. It seems the Land Processes DAAC servers are overloaded for a long time. It works occasionally. |
thank for reply me |
@rtburns-jpl with #560 being merged, I confirmed |
Hi everyone |
@sisi-ali It would be better to ask on the MintPy discussion site https://github.com/insarlab/MintPy/discussions or on their Google Group. |
hi dear Eric Fielding
I want to calculate the closure_phase_bias.py using the MintPy software
that I per-processed on ISCE,
but I cant calculate with (
https://github.com/insarlab/MintPy/blob/main/mintpy/closure_phase_bias.py)
I would be grateful if you could guide me
Eric Fielding ***@***.***> در تاریخ پنجشنبه ۱۱ اوت
۲۰۲۲ ساعت ۲:۵۳ نوشت:
… @sisi-ali <https://github.com/sisi-ali> Please get the new version of
ISCE2. We have finally found the necessary change to the DEM downloading
code in #560 <#560>.
—
Reply to this email directly, view it on GitHub
<#458 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZ3AKUSOWIULYCD26XTE3T3VYQTW7ANCNFSM5QX4THTA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello, I running ISCE 2.6.1. The topsApp.py crashes at the DEM steps when it is trying to convert to DEM. I am getting the same error "SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats" Is anyone able to help me with this? Thanks! |
@krive050 The easy workaround is to change your Python to version 3.9 instead of version 3.10. |
@yunjunz Hi Dr.Yunjun! I met the same question when using dem.py with Python's version = 3.10. I've tried to add #define PY_SSIZE_T_CLEAN to [correct_geoid_i2_srtmmodule.cpp#L30] but nothing changed at all. Could you please give me hints on solving this problem? Many thanks! |
Hi Jolinna, you should upgrade to ISCE2 version 2.6.3. It has been updated to work with Python 3.10. |
Hi Eric, thanks for your kind reply! I'll try it! |
In the
rangecoreg
step,topsApp
crashes with the following error message:As documented in other cases (https://stackoverflow.com/questions/70705404/systemerror-py-ssize-t-clean-macro-must-be-defined-for-formats), this error results from isce not being compatible with
python3.10
.However, I've confirmed this error is circumvented with using an earlier version (
python 3.9.10
). So until this compatibility issue is resolved,<python3.10
dependencies should be enforced.The text was updated successfully, but these errors were encountered: