MiaplPy icon indicating copy to clipboard operation
MiaplPy copied to clipboard

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

Open alejobeap opened this issue 2 years ago • 2 comments

          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 https://github.com/insarlab/MiaplPy/issues/45#issuecomment-1474153246

alejobeap avatar Mar 17 '23 17:03 alejobeap

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

https://github.com/insarlab/MiaplPy/blob/30fa971f893fa5e596efc6538822f37f86750f06/miaplpy/defaults/auto_path.py#L18-L61

mirzaees avatar Mar 17 '23 20:03 mirzaees

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

anuragsharma03 avatar Nov 16 '23 22:11 anuragsharma03

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!

david-ncu2019 avatar Aug 04 '24 02:08 david-ncu2019