nasa-jpl / autoRIFT

A Python module of a fast and intelligent algorithm for finding the pixel displacement between two images
Apache License 2.0
218 stars 53 forks source link

testautoRIFT_ISCE.py : ImportError: cannot import name '__version__' #56

Closed guangbaoshen closed 2 years ago

guangbaoshen commented 2 years ago

I met the error below, is that mean something wrong with the init.py file? Is there anyone has met the error before? Thank you for your help.

theone@noone:~/AutoRIFT/merged$ testautoRIFT_ISCE.py -m reference.slc.full -s secondary.slc.full This is the Open Source version of ISCE. Some of the workflows depend on a separate licensed package. To obtain the licensed package, please make a request for ISCE through the website: https://download.jpl.nasa.gov/ops/request/index.cfm. Alternatively, if you are a member, or can become a member of WinSAR you may be able to obtain access to a version of the licensed sofware at https://winsar.unavco.org/software/isce Traceback (most recent call last): File "/home/theone/isce2/install/isce/components/contrib/geo_autoRIFT/testautoRIFT_ISCE.py", line 1007, in main() File "/home/theone/isce2/install/isce/components/contrib/geo_autoRIFT/testautoRIFT_ISCE.py", line 392, in main nc_sensor=inps.nc_sensor, mpflag=inps.mpflag, ncname=inps.ncname) File "/home/theone/isce2/install/isce/components/contrib/geo_autoRIFT/testautoRIFT_ISCE.py", line 404, in generateAutoriftProduct from components.contrib.geo_autoRIFT.autoRIFT import version as version ImportError: cannot import name 'version'

gyp-1991-gq commented 2 years ago

你好,我是云南大学的,我也在用这个工具,方便留个联系方式吗?有几个问题想请教您!谢谢!

leiyangleon commented 2 years ago

@guangbaoshen this is weird. The version attribute is defined here, and should be assigned when importing the autoRIFT module. Were you able to run autoRIFT successfully before or did this error occur after some update of the software or its Python dependencies? I would try reinstalling autoRIFT and/or ISCE2, and test by running from components.contrib.geo_autoRIFT.autoRIFT import __version__ as version in the Python environment

leiyangleon commented 2 years ago

@guangbaoshen actually the testautoRIFT_ISCE.py script you have had two missing __ before/after version. Your above message shows line 404 in testautoRIFT_ISCE.py: from components.contrib.geo_autoRIFT.autoRIFT import version as version while the line 404 in the autoRIFT source code from components.contrib.geo_autoRIFT.autoRIFT import __version__ as version