Sen2Cor-02.05.05-win64 - AttributeError: 'L2A_Tables' Object has no attribute '_L2A_Tile_PVI_File'

Hi Mr.Fabrizio
Can you explain your way for process Sen2cor at 10m resolution in snap software?

hello is there is a facebook page like a forume

hello if you can explain to me this message
when im using sen2COR on a specific tile dated in 2015 extracted from folder image that containes several tilesScreenshot%20-%2001_10_2018%20%2C%2022_21_02

It seems that you are trying to correct only a granule. This is possible by using sen2cor, but you need to have the original structure of the full S2 product. Have you copy-paste only the granule folder of your product?

thanks obarrilero
yes i just opened a granule that im looking for woek on
so what i have to do in this case

If you want to use sen2cor in only one granule, you have to open it without changing the product structure. This is, you cannot extract the granule folder from the product folder because sen2cor needs also some files that are in the product folder but not in the granule folder.

thanks thanks just i want to know also why i have the error when extract all folder from winrar

I do not know exactly which is the error you are having with winrar, but perhaps it is caused by the long path names of the files. You are working with an old product with the old naming convention. It uses a lot of character and in windows there is a limitation. See:

So in Windows, it is only possible to manage them if you use a very short path. For example, if you extract your product directly in C:/ or D:/ instead of D:/myFolder/myProducts/Sentinel2/…
On the other hand, some problems were also reported when using some zip tools. I suggest you to use 7zip

thanks a lot of
yes the problem is whene i unzip i got several error as a message

thanks fabrizion in fact i dont have problem with sen2COR COORECTION I MAKE CORRECTION CORRECTELY Im RESAMPLING BAND of SENTINEL 2A LEVEL 2 producted IN SNAP I GOT SWIR BAND WITH 10 M RESOLUTION BUT when i export it in geotiff format to open it for more processing in qgis scp plugin i found that swir band is still in 20 M RESOLUTION

Hi Fabrizio,

I have tried not specifying the resolution but still runs to an error. please help.:sob::sob:

I have no idea how to do so, please, could you help me, I am not a programmer nor a geographer, so, when you say "go to the folder … I have no idea where to start… it might sound super silly, but really, no idea where to start doing so… please help!!

I received the error stated at the top of this thread:
AttributeError: ‘L2A_Tables’ object has no attribute ‘_L2A_Tile_PVI_File’

I understand that when I specify 10m resolution sen2cor will generate 20m as well since it’s needed to generate 10m.

The USER L2A folder is created and the 20m bands are generated however the folder where the 10m bands should be is empty.

My command is:
PS C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64> .\L2A_process --resolution 10 D:\Testsen2three2016\S2A_OPER_PRD_MSIL1C_PDMC_20160610T224046_R055_V20160610T174002_20160610T174002.SAFE
Here’s where things start to fall apart:
Progress[%]: 21.72 : PID-7920, L2A_Tables: band VIS exported, elapsed time[s]: 0.797, total: 0:11:00.445000
Process L2A_ProcessTile-1:
Traceback (most recent call last):
File “C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64\lib\multiprocessing\process.py”, line 258, in _bootstrap
self.run()
File “C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 136, in run
if not self.process_10():
File “C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 179, in process_10
if not self.process_20():
File “C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 158, in process_20
return self.process()
File “C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 229, in process
if self.postprocess() == False:
File “C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_ProcessTile.py”, line 311, in postprocess
if not self.tables.exportBandList():
File “C:\Users\colin\AppData\Local\Sen2Cor-02.05.05-win64\Lib\site-packages\sen2cor\L2A_Tables.py”, line 2307, in exportBandList
fn = os.path.basename(self._L2A_Tile_PVI_File)
AttributeError: ‘L2A_Tables’ object has no attribute ‘_L2A_Tile_PVI_File’

you need to start with 60 meters, than repeat with 20 meters and lastly 10 meters. All referring to the same input file.

1 Like

This worked! Thank you. I thought that when not specifying a resolution sec2cor would process at 60, then 20, then 10m automatically.
.\L2A_process --resolution 60 D:\Testsen2three2016\S2A_OPER_PRD_MSIL1C_PDMC_20160610T224046_R055_V20160610T174002_20160610T174002.SAFE
.\L2A_process --resolution 20 D:\Testsen2three2016\S2A_OPER_PRD_MSIL1C_PDMC_20160610T224046_R055_V20160610T174002_20160610T174002.SAFE
.\L2A_process --resolution 10 D:\Testsen2three2016\S2A_OPER_PRD_MSIL1C_PDMC_20160610T224046_R055_V20160610T174002_20160610T174002.SAFE

I did ask (but now edited) how I’d be able to execute these commands sequentially automatedly on my computer to save time. However, it seems if I just copy and paste all of these into the command line they will execute one after the other. It seemed at first this did not work.

you mean’s for the same product, first run sen2cor with 60 meters than 20 meters and final 10 meters …

yes. Just as @acidjazz described it.

I follow @acidjazz instructions and it’s work… but now I have little confusion about the output’s whether I have to open the MTD_MSI2A.xml file (located in the main folder )or MTD_TL.xml file (located in GRANULE subfolder) and also is there any need of resampling the sen2cor output.

Regards

Should open the product using the .xml file found in the main folder.
I’m not sure what you mean by needing to resample.
If you open the product I think the bands are present at their defined resolutions as per the product specifications.

Have you solved it? I have the same problem,I don’t know why.Please help me,thanks a lot.