Details: Element 'BAND_NAME': This element is not expected.`
The code block in the L2AXmlParser throwing this error message is: def validate(self):
fn = os.path.basename(self._xmlFn)
self._logger.info(āvalidating metadata file %s against schemeā % fn)
l.acquire()
try:
schema = etree.XMLSchema(file = os.path.join(self._config.configDir, self._scheme))
parser = etree.XMLParser(schema = schema)
objectify.parse(self._xmlFn, parser)
self._logger.info(āmetadata file is validā)
ret = True
except etree.XMLSyntaxError, err:
stdoutWrite(āMetadata file is invalid, see report file for details.\nā)
self._logger.error(āSchema file: %sā % self._scheme)
self._logger.error(āDetails: %sā % str(err))
ret = False
except:
stdoutWrite(āUnspecific Error in metadata.\nā)
self._logger.error(āunspecific error in metadataā)
ret = False
finally:
l.release()
return ret
Are there other people experiencing this? A consequence of this error message is, that some of the quality flag bands and quality meta data are not created once the processing of the L1C bands has finished. Any help or hints to solve this problem are greatly appreciated. This test was performed with sen2cor installed on a centos7 vm using the standard installation with anaconda creating the necessary python environment for sen2cor to run.
I have a number of Parsing error messages while using sen2cor 2.3.1 and calling the command from python 2.7 (anaconda distr.):
Syntax error in metadata, see report file for details.
Parsing error:
Schema file: L2A_CAL_AC_GIPP.xsd
Details: Element āwavelengthā, attribute āc0ā: āā is not a valid value of the local atomic type. (line 0)
Syntax error in metadata, see report file for details.
Parsing error:
Schema file: L2A_GIPP.xsd
Details: Element āPSD_Schemeā, attribute āPSD_Versionā: [facet ālengthā] The value āā has a length of ā0ā; this differs from the allowed length of ā2ā. (line 0)
Parsing error:
Schema file: L2A_CAL_AC_GIPP.xsd
Details: Element āwavelengthā, attribute āc0ā: āā is not a valid value of the local atomic type. (line 0)
Parsing error:
Schema file: L2A_GIPP.xsd
Details: Element āPSD_Schemeā, attribute āPSD_Versionā: [facet ālengthā] The value āā has a length of ā0ā; this differs from the allowed length of ā2ā. (line 0)
Syntax error in metadata, see report file for details.
Parsing error:
Schema file: S2-PDGS-TAS-DI-PSD-V14.2_Schema/S2_PDI_Level-1C_Tile_Metadata.xsd
Details: Element āTILE_IDā, attribute āmetadataLevelā: The value ā(null)ā does not match the fixed value constraint āBriefā. (line 0)
Syntax error in metadata, see report file for details.
Parsing error:
Schema file: S2-PDGS-TAS-DI-PSD-V14.2_Schema/S2_PDI_Level-2A_Datastrip_Metadata.xsd
Details: Element āDatatake_Infoā, attribute ādatatakeIdentifierā: [facet āpatternā] The value āā is not accepted by the pattern āGS2(A|B)\d{8}T\d{6}\d{6}_N\d{2}.\d{2}ā. (line 0)
After this error is thrown it doesnāt stop the processing. However, no outputs are being produced.
Syntax error in metadata, see report file for details.
Parsing error:
Schema file: L2A_CAL_AC_GIPP.xsd
Details: Element āwavelengthā, attribute āc0ā: āā is not a valid value of the local atomic type. (line 0)
There is a bug in the libxml2 library version 2.9.4 installed by Anaconda 2.4.0 which is used in the SEN2CORās L2A_XmlParser.py module for reading and validating XML config files L2A_CAL_AC_GIPP.xml, L2A_CAL_SC_GIPP.xml and L2A_GIPP.xml. Even though the XML files are correct, they are not correctly validated as such by the XML parser due to this bug. Details are described here: https://bugzilla.gnome.org/show_bug.cgi?id=766834
The solution is downgrading the libxml2 library to the version 2.9.2 which is not affected by the bug. This is done by the following command: