Crash when analyzing the raw directory content
The code crashes (see output below) when running with an non-empty raw directory containing wrong SAFE file (like SLC data rather than GRD).
(s1tilingV0.2) [koleck@node155 s1tiling]$ S1Processor Guyane.cfg
DEBUG - Running S1Tiling with:
DEBUG - [Paths]
DEBUG - - geoid_file : ./s1tiling/resources/Geoid/egm96.grd
DEBUG - - output : /work/scratch/koleck/data_out
DEBUG - - s1_images : /work/scratch/koleck/raw
DEBUG - - srtm : /work/datalake/static_aux/MNT/SRTM_30_hgt
DEBUG - - tmp : /work/scratch/koleck/tmp
DEBUG - [DataSource]
DEBUG - - download : True
DEBUG - - first_date : 2020-08-01
DEBUG - - last_date : 2020-12-31
DEBUG - - polarisation : VV VH
DEBUG - - roi_by_tiles : ALL
DEBUG - [Processing]
DEBUG - - calibration : sigma
DEBUG - - mode : debug logging
DEBUG - - nb_otb_threads : 2
DEBUG - - nb_parallel_processes : 10
DEBUG - - orthorectification_gridspacing : 40.0
DEBUG - - output_spatial_resolution : 10.0
DEBUG - - ram_per_process : 4096
DEBUG - - remove_thermal_noise : True
DEBUG - - srtm_shapefile : ./s1tiling/resources/shapefile/srtm.shp
DEBUG - - tile_to_product_overlap_ratio : 0.5
DEBUG - - tiles : ['21NZF']
DEBUG - - tiles_shapefile : ./s1tiling/resources/shapefile/Features.shp
DEBUG - [Mask]
DEBUG - - generate_border_mask : False
DEBUG - prod: S1B_S6_SLC__1SDV_20201118T145236_20201118T145300_024320_02E3E6_CD5A.SAFE
Traceback (most recent call last):
File "/home/il/koleck/.conda/envs/s1tilingV0.2/bin/S1Processor", line 33, in <module>
sys.exit(load_entry_point('S1Tiling', 'console_scripts', 'S1Processor')())
File "/home/il/koleck/.conda/envs/s1tilingV0.2/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/il/koleck/.conda/envs/s1tilingV0.2/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/il/koleck/.conda/envs/s1tilingV0.2/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/il/koleck/.conda/envs/s1tilingV0.2/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/il/koleck/tropisco/s1tiling/s1tiling/S1Processor.py", line 324, in main
with S1FileManager(config) as s1_file_manager:
File "/home/il/koleck/tropisco/s1tiling/s1tiling/libs/S1FileManager.py", line 202, in __init__
self._update_s1_img_list()
File "/home/il/koleck/tropisco/s1tiling/s1tiling/libs/S1FileManager.py", line 440, in _update_s1_img_list
content = [d for d in content if self.is_product_in_time_range(d.path)]
File "/home/il/koleck/tropisco/s1tiling/s1tiling/libs/S1FileManager.py", line 440, in <listcomp>
content = [d for d in content if self.is_product_in_time_range(d.path)]
File "/home/il/koleck/tropisco/s1tiling/s1tiling/libs/S1FileManager.py", line 522, in is_product_in_time_range
YYYY, MM, DD = prod_re.match(path).groups()
AttributeError: 'NoneType' object has no attribute 'groups'
Edited by Thierry Koleck