TypeError: object of type 'NoneType' has no len()

I am using the Sen2cor standalone package for converting L1C data into L2A product. But i am getting the error of “TypeError: object of type ‘NoneType’ has no len()”. Please help me. I am stuck there.

I think I know what has happened, but not how or why.

A value in the .config object (L2A_TILE_MTD_XML) has the value None - where it should have been overwritten with the file path used to store the metadata for the granule - a file called MTD_TL.xml

Without more details of your setup I can’t see why this happened.

One workround to try - if the sen2cor program has crashed before, it may have left a partially complete output directory. Look for a directory named S2?_MSIL2A_XX.SAFE, where XX is the long date and orbit string and ? is either A or B. The XX part will appear in the input filename you are trying to process. Try deleting this directory - be careful not to get the _MSIL1C_ directory that contains your input data!

1 Like

I am using windows operating system. And Sen2cor standalone is installed on the system. Snap 6.0.0 is used for the processing of sentinel-2 imagery.