Output filename assertion error

Post Reply
eli_tes
Posts: 4
Joined: Wed Mar 02, 2022 1:03 pm
company / institution: University of Bergen
Location: Bergen

Output filename assertion error

Post by eli_tes »

Hi, I am running into this issue with using Polymer in WSL.
I can't really tell what the problem is, it seems that maybe there is something wrong with my output filename?

Code: Select all

(polymer) ete@ift:/mnt/c/Users/ete/AtmCorr/polymer-v4.14$ ./polymer_cli.py '/mnt/c/Users/ete/Sat_data/Sentinel-2/S2B_MSIL1C_20210622T105619_N0300_R094_T32VMP_20210622T115554/S2B_MSIL1C_20210622T105619_N0300_R094_T32VMP_20210622T115554.SAFE/GRANULE/L1C_T32VMP_A022428_20210622T105917'  
'/mnt/c/Users/ete/Sat_data/Sentinel-2/S2B_MSIL1C_20210622T105619_N0300_R094_T32VMP_20210622T115554/polymer_sen2/test.nc'             
Starting processing at 2022-06-13 15:19:46.652705                                                                                           
 Initialize MSI projection EPSG:32632                                                
/home/etess/anaconda3/envs/polymer/lib/python3.8/site-packages/pyproj/crs/crs.py:130: FutureWarning: '+init=<authority>:<code>'
syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6
in_crs_string = _prepare_from_proj_string(in_crs_string)                                                                                       
Initializing output file "/mnt/c/Users/ete/Sat_data/Sentinel-2/S2B_MSIL1C_20210622T105619_N0300_R094_T32VMP_20210622T115554/polymer_sen2/test.nc"
Traceback (most recent call last):                                                                                                                 
File "./polymer_cli.py", line 34, in <module>
run_atm_corr(Level1(args.input_file),                                                                                                          
File "/mnt/c/Users/ete/AtmCorr/polymer-v4.14/polymer/main.py", line 517, in run_atm_corr                                                        
for block in block_iter:                                                                                                                       
File "/mnt/c/Users/ete/AtmCorr/polymer-v4.14/polymer/main.py", line 434, in blockiterator                                                       
for block in level1.blocks(params.bands_read()):                                                                                               
File "/mnt/c/Users/ete/AtmCorr/polymer-v4.14/polymer/level1_msi.py", line 401, in blocks                                                        
yield self.read_block(size, offset, bands_read)                                                                                                
File "/mnt/c/Users/ete/AtmCorr/polymer-v4.14/polymer/level1_msi.py", line 332, in read_block
raw_data = self.read_TOA(band, size, offset)                                                                                                   
File "/mnt/c/Users/ete/AtmCorr/polymer-v4.14/polymer/level1_msi.py", line 272, in read_TOA                                                      
jp = Jp2k(self.get_filename(band))                                                                                                             
File "/mnt/c/Users/ete/AtmCorr/polymer-v4.14/polymer/level1_msi.py", line 262, in get_filename
assert len(filenames) == 1                                                                                                                   
AssertionError                            
User avatar
fsteinmetz
Site Admin
Posts: 306
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: Output filename assertion error

Post by fsteinmetz »

Hi,

No, I think the problem is on the input file : you should provide the path the the granule (ex: S2B_MSIL1C_20200719T100029_N0209_R122_T32TQR_20200719T124000.SAFE/GRANULE/L1C_T32TQR_A017594_20200719T100614)

Cheers,
François
eli_tes
Posts: 4
Joined: Wed Mar 02, 2022 1:03 pm
company / institution: University of Bergen
Location: Bergen

Re: Output filename assertion error

Post by eli_tes »

Hi François! Thanks for the quick response and also your previous help, now everything works!
Post Reply