Sen2cor v2.2.1 execution error

I’m using RedHat 6 OS with sen2cor version 2.2.1.

After several execution without any problem, I have the following problem when running it againt with a same input products.

$ /dpc/app/hosted/L2A_Process/02.02.01/scripts/L2A_Process.bash 02.02.01 --resolution 60 /mp/AI/cgs1/DAGC/Repository/S2A_OPER_PRD_MSIL1C_PDMC_20161028T055106_R102_V20160505T004712_20160505T005558.SAFE
Start of L2A processor …
L2A_Process-02.02.01 --resolution 60 /mp/AI/cgs1/DAGC/Repository/S2A_OPER_PRD_MSIL1C_PDMC_20161028T055106_R102_V20160505T004712_20160505T005558.SAFE
DEBUG : L2A_Process-02.02.01 --resolution 60 --GIP_L2A L2A_GIPP.xml --GIP_L2A_SC L2A_CAL_SC_GIPP.xml --GIP_L2A_AC L2A_CAL_AC_GIPP.xml /mp/AI/cgs1/DAGC/Repository/S2A_OPER_PRD_MSIL1C_PDMC_20161028T055106_R102_V20160505T004712_20160505T005558.SAFE

Sentinel-2 Level 2A Prototype Processor (Sen2Cor), 2.2.1, created: 2016.04.29 started …
Traceback (most recent call last):
File “/dpc/app/hosted/L2A_Process/02.02.01/install/anaconda/bin/L2A_Process-02.02.01”, line 9, in
load_entry_point(‘sen2cor==2.2.1’, ‘console_scripts’, ‘L2A_Process-02.02.01’)()
File “/dpc/app/hosted/L2A_Process/02.02.01/install/anaconda/lib/python2.7/site-packages/sen2cor-2.2.1-py2.7.egg/sen2cor/L2A_Process.py”, line 221, in main
result = config.readPreferences()
File “/dpc/app/hosted/L2A_Process/02.02.01/install/anaconda/lib/python2.7/site-packages/sen2cor-2.2.1-py2.7.egg/sen2cor/L2A_Config.py”, line 3488, in readPreferences
xp.export()
File “/dpc/app/hosted/L2A_Process/02.02.01/install/anaconda/lib/python2.7/site-packages/sen2cor-2.2.1-py2.7.egg/sen2cor/L2A_XmlParser.py”, line 161, in export
objectify.deannotate(self._root, xsi_nil=True, cleanup_namespaces=True)
File “src/lxml/lxml.objectify.pyx”, line 1728, in lxml.objectify.deannotate (src/lxml/lxml.objectify.c:24541)
File “src/lxml/cleanup.pxi”, line 49, in lxml.etree.strip_attributes (src/lxml/lxml.etree.c:150093)
File “src/lxml/apihelpers.pxi”, line 63, in lxml.etree._rootNodeOrRaise (src/lxml/lxml.etree.c:15691)
TypeError: Invalid input object: NoneType
return 1

The only way to fix the problem is to re-install sen2core. Is it the same problem for somebody else ?

Here my pip list :
alabaster (0.7.8)
anaconda-client (1.4.0)
anaconda-navigator (1.2.1)
argcomplete (1.0.0)
astropy (1.2.1)
Babel (2.3.3)
backports-abc (0.4)
backports.shutil-get-terminal-size (1.0.0)
backports.ssl-match-hostname (3.4.0.2)
beautifulsoup4 (4.4.1)
bitarray (0.8.1)
blaze (0.10.1)
bokeh (0.12.0)
boto (2.40.0)
Bottleneck (1.1.0)
cdecimal (2.3)
cffi (1.6.0)
chest (0.2.3)
click (6.6)
cloudpickle (0.2.1)
clyent (1.2.2)
colorama (0.3.7)
conda (4.2.9)
conda-build (1.21.3)
configobj (5.0.6)
configparser (3.5.0b2)
contextlib2 (0.5.3)
cryptography (1.4)
cycler (0.10.0)
Cython (0.24)
cytoolz (0.8.0)
dask (0.10.0)
datashape (0.5.2)
decorator (4.0.10)
dill (0.2.5)
docutils (0.12)
dynd (0.7.3.dev1)
enum34 (1.1.6)
et-xmlfile (1.0.1)
fastcache (1.0.2)
Flask (0.11.1)
Flask-Cors (2.1.2)
funcsigs (1.0.2)
functools32 (3.2.3.post2)
futures (3.0.5)
GDAL (2.1.0)
gevent (1.1.1)
Glymur (0.8.4)
greenlet (0.4.10)
grin (1.2.1)
h5py (2.6.0)
HeapDict (1.0.0)
idna (2.1)
imagesize (0.7.1)
ipaddress (1.0.16)
ipykernel (4.3.1)
ipython (4.2.0)
ipython-genutils (0.1.0)
ipywidgets (4.1.1)
itsdangerous (0.24)
jdcal (1.2)
jedi (0.9.0)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter (1.0.0)
jupyter-client (4.3.0)
jupyter-console (4.1.1)
jupyter-core (4.1.0)
llvmlite (0.11.0)
locket (0.2.0)
lxml (3.6.0)
MarkupSafe (0.23)
matplotlib (1.5.1)
mistune (0.7.2)
mpmath (0.19)
multipledispatch (0.4.8)
nb-anacondacloud (1.1.0)
nb-conda (1.1.0)
nb-conda-kernels (1.0.3)
nbconvert (4.2.0)
nbformat (4.0.1)
nbpresent (3.0.2)
networkx (1.11)
nltk (3.2.1)
nose (1.3.7)
notebook (4.2.1)
numba (0.26.0)
numexpr (2.6.0)
numpy (1.11.1)
odo (0.5.0)
openpyxl (2.3.2)
pandas (0.18.1)
partd (0.3.4)
path.py (0.0.0)
pathlib2 (2.1.0)
patsy (0.4.1)
pep8 (1.7.0)
pexpect (4.0.1)
pickleshare (0.7.2)
Pillow (3.2.0)
pip (8.1.2)
ply (3.8)
psutil (4.3.0)
ptyprocess (0.5.1)
py (1.4.31)
pyasn1 (0.1.9)
pycairo (1.10.0)
pycosat (0.6.1)
pycparser (2.14)
pycrypto (2.6.1)
pycurl (7.43.0)
pyflakes (1.2.3)
Pygments (2.1.3)
pyOpenSSL (16.0.0)
pyparsing (2.1.4)
pytest (2.9.2)
python-dateutil (2.5.3)
pytz (2016.4)
PyYAML (3.11)
pyzmq (15.2.0)
qtconsole (4.2.1)
QtPy (1.0.2)
redis (2.10.5)
requests (2.10.0)
rope (0.9.4)
ruamel-yaml (-VERSION)
scikit-image (0.12.3)
scikit-learn (0.17.1)
scipy (0.17.1)
sen2cor (2.2.1)
setuptools (23.0.0)
simplegeneric (0.8.1)
singledispatch (3.4.0.3)
six (1.10.0)
snowballstemmer (1.2.1)
sockjs-tornado (1.0.3)
Sphinx (1.4.1)
sphinx-rtd-theme (0.1.9)
spyder (2.3.9)
SQLAlchemy (1.0.13)
statsmodels (0.6.1)
sympy (1.0)
tables (3.2.3.1)
terminado (0.6)
toolz (0.8.0)
tornado (4.3)
traitlets (4.2.1)
unicodecsv (0.14.1)
Werkzeug (0.11.10)
wheel (0.29.0)
xlrd (1.0.0)
XlsxWriter (0.9.2)
xlwt (1.1.2)

I had the same issue on the second run of sen2cor. I blamed it on the L2A product being already present in the destination, but I uninstalled it without trying to run it again.

Hallo agrosc,

try to delete or rename the existing L2A-product.
I had also a problem running a L1C-product again. I don’t remember the exact error message, but after deleting the old product the processing was running without problem. However, I cannot reproduce this problem currently.

bdpg

Thanks for your reply,

I will try to remove L2A product but according to the L2A documentation, if L2A processes is completed for a resolution, you can re-execute it, and it will have no re-computing. Only if new resolution is requested.

My main problem that I will use L2A process over many PCs (with only 1 core) in parallel with parallel processing from different PCs (not using internal parallelism of L2A changing L2A GPP file).