@@ -1114,19 +1114,20 @@ def _pre_process_snap(
11141114 misc .run_cli (cmd_list )
11151115
11161116 # Check the BEAM-DIMAP output exists (if not, trigger CSK fallback)
1117- assert (
1118- AnyPath ( pp_dim ). suffix == ".data" and AnyPath ( pp_dim ). is_dir ()
1117+ assert AnyPath ( pp_dim ). suffix == ".dim" , (
1118+ f"Assert { pp_dim } is written in BEAM-DIMAP"
11191119 )
1120+ assert AnyPath (pp_dim ).is_dir (), f"Assert { pp_dim } is a directory"
11201121
11211122 # With SNAP 13.0.0, there is an issue with CSK and calibration:
11221123 # - no output is written for DGM
11231124 # - GPT graph fails for SCS
11241125 # Add this fallback for the moment
1125- except AssertionError :
1126- self ._fallback_csk_snap_13 (write_lia , tmp_dir , snap_args )
1126+ except AssertionError as ex :
1127+ self ._fallback_csk_snap_13 (write_lia , tmp_dir , snap_args , ex )
11271128 except RuntimeError as ex :
11281129 if self .constellation == Constellation .CSK :
1129- self ._fallback_csk_snap_13 (write_lia , tmp_dir , snap_args )
1130+ self ._fallback_csk_snap_13 (write_lia , tmp_dir , snap_args , ex )
11301131 else :
11311132 raise RuntimeError ("Something went wrong with SNAP!" ) from ex
11321133
@@ -1146,11 +1147,12 @@ def _pre_process_snap(
11461147 pre_processed_path , pp_dim , band , crop = window_to_crop , ** kwargs
11471148 )
11481149
1149- def _fallback_csk_snap_13 (self , write_lia : bool , tmp_dir , snap_args ):
1150+ def _fallback_csk_snap_13 (self , write_lia : bool , tmp_dir , snap_args , ex ):
11501151 """
11511152 With SNAP 13.0.0, there is an issue with CSK and calibration
11521153 Apply this fallback until it's resolved
11531154 """
1155+ LOGGER .debug (ex )
11541156 LOGGER .warning (
11551157 "There is an issue with CSK and calibration with SNAP 13.0.0. "
11561158 "This step is removed to make the computation work nevertheless. "
0 commit comments