Skip to content
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

Stack ISCE, SLC with os.scandir(src) as itr: FileNotFoundError: [Errno 2] No such file or directory: '' #46

Open
alejobeap opened this issue Mar 17, 2023 · 3 comments

Comments

@alejobeap
Copy link

          Hi 

Thanks for your answer, but in my case I run the stack with ISCE2 with stackSentinel.py and according to the example template
minopy.load.slcFile = ../merged/SLC//.slc.full #[path2slc_file]
I only have the *.slc.full.vrt and *slc.full.xml for each date.

The message is:

File "/home//tools/MiaplPy/miaplpy/miaplpyApp.py", line 801, in
main()
File "/home/tools/MiaplPy/miaplpy/miaplpyApp.py", line 82, in main
app.open()
File "/home/stools/MiaplPy/miaplpy/miaplpyApp.py", line 176, in open
self.date_list, self.num_pixels, self.metadata = read_initial_info(self.workDir, self.templateFile)
File "/home/tools/MiaplPy/miaplpy/objects/utils.py", line 1221, in read_initial_info
iDict = read_inps2dict(inps_loadSlc)
File "/home/tools/MiaplPy/miaplpy/objects/utils.py", line 1293, in read_inps2dict
shutil.copytree(reference_dir, out_reference)

with os.scandir(src) as itr:
FileNotFoundError: [Errno 2] No such file or directory: ''

The same of @gongzhiqiang97

Thanks

Alejandro

Originally posted by @alejobeap in #45 (comment)

@mirzaees
Copy link
Collaborator

Hi @alejobeap
Please use the full path in your template and try again. Use the following format:

# Default path of data files from different InSAR processors to be loaded into MintPy
isceTopsAutoPath = '''##----------Default file path of ISCE/topsStack products
miaplpy.load.processor = isce
miaplpy.load.metaFile = ${PROJECT_DIR}/reference/IW*.xml
miaplpy.load.baselineDir = ${PROJECT_DIR}/baselines
miaplpy.load.slcFile = ${PROJECT_DIR}/merged/SLC/*/*.slc.full
miaplpy.load.unwFile = ${WORK_DIR}/inverted/interferograms_${int_type}/*/fi*.unw
miaplpy.load.corFile = ${WORK_DIR}/inverted/interferograms_${int_type}/*/fi*.cor
miaplpy.load.connCompFile = ${WORK_DIR}/inverted/interferograms_${int_type}/*/*.unw.conncomp
miaplpy.load.ionoFile = None
miaplpy.load.intFile = None
miaplpy.load.demFile = ${PROJECT_DIR}/merged/geom_reference/hgt.rdr.full
miaplpy.load.lookupYFile = ${PROJECT_DIR}/merged/geom_reference/lat.rdr.full
miaplpy.load.lookupXFile = ${PROJECT_DIR}/merged/geom_reference/lon.rdr.full
miaplpy.load.incAngleFile = ${PROJECT_DIR}/merged/geom_reference/los.rdr.full
miaplpy.load.azAngleFile = ${PROJECT_DIR}/merged/geom_reference/los.rdr.full
miaplpy.load.shadowMaskFile = ${PROJECT_DIR}/merged/geom_reference/shadowMask.rdr.full
miaplpy.load.waterMaskFile = ${PROJECT_DIR}/merged/geom_reference/waterMask.rdr.full
miaplpy.load.bperpFile = None
'''
isceStripmapAutoPath = '''##----------Default file path of ISCE/stripmapStack products
miaplpy.load.processor = isce
miaplpy.load.metaFile = ${referenceShelve}/referenceShelve/data.dat
miaplpy.load.baselineDir = ${PROJECT_DIR}/baselines
miaplpy.load.slcFile = ${PROJECT_DIR}/merged/SLC/*/*.slc
miaplpy.load.unwFile = ${WORK_DIR}/inverted/interferograms_${int_type}/*/fi*.unw
miaplpy.load.corFile = ${WORK_DIR}/inverted/interferograms_${int_type}/*/fi*.cor
miaplpy.load.connCompFile = ${WORK_DIR}/inverted/interferograms_${int_type}/*/*.unw.conncomp
miaplpy.load.ionoFile = None
miaplpy.load.intFile = None
miaplpy.load.demFile = ${PROJECT_DIR}/merged/geom_reference/hgt.rdr
miaplpy.load.lookupYFile = ${PROJECT_DIR}/merged/geom_reference/lat.rdr
miaplpy.load.lookupXFile = ${PROJECT_DIR}/merged/geom_reference/lon.rdr
miaplpy.load.incAngleFile = ${PROJECT_DIR}/merged/geom_reference/los.rdr
miaplpy.load.azAngleFile = ${PROJECT_DIR}/merged/geom_reference/los.rdr
miaplpy.load.shadowMaskFile = ${PROJECT_DIR}/merged/geom_reference/shadowMask.rdr
miaplpy.load.shadowMaskFile = ${PROJECT_DIR}/merged/geom_reference/waterMask.rdr.full
miaplpy.load.bperpFile = None

@anuragsharma03
Copy link

anuragsharma03 commented Nov 16, 2023

Hi, I am encountering a similar error. I have used ISCE2 stacksentinel to create a stack of interferograms. I tried setting the full path in the template, but still getting the same error again. I have attached screenshots of the error along with the template I am using to run the first step of Miaplpy. Could you please help to resolve this issue?
error
template
Also, I am not getting what path is to set below for unwrapped, connected component. It looks like it is something different from MintPy template for unwrapped, connected component. I have successfully run the MintPy number of times but Miaplpy is really giving hard time.
miaplpy.load.unwFile = ${WORK_DIR}/inverted/interferograms_${int_type}//fi.unw
miaplpy.load.corFile = ${WORK_DIR}/inverted/interferograms_${int_type}//fi.cor
miaplpy.load.connCompFile = ${WORK_DIR}/inverted/interferograms_${int_type}//.unw.conncomp

@david-ncu2019
Copy link

david-ncu2019 commented Aug 4, 2024

This is how I solved the issue:

with os.scandir(src) as itr:
FileNotFoundError: [Errno 2] No such file or directory: ''

Short answer

I copied the content of my custom miaplpy config file to the miaplpyApp.cfg in the folder miaplpy (this will appear when you failed at running the script), then run load_data again.

Long answer

I open the file miaplApp.py located in ./lib/python3.8/site-packages/miaplpy, then go to line 169, print out self.workDir and self.templateFile to see the locations where the program will choose as working directory, as well as the config file from which it gets the parameters.
After printing them out, you will know what to do next. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants