Question

I ran command testing the Gaslog example of Augutus:

Augustus consumer_config.xcfg

But got following error:

Traceback (most recent call last):
  File "/usr/local/bin/Augustus", line 171, in <module>
    main(config)
  File "/usr/local/lib/python2.7/dist-packages/augustus/engine/mainloop.py", line 532, in main
    mainLoop = MainLoop(configuration, dataStream=dataStream, rethrowExceptions=rethrowExceptions)
  File "/usr/local/lib/python2.7/dist-packages/augustus/engine/mainloop.py", line 150, in __init__
    self.model = xmlbase.loadfile(fileLocation, pmml.X_ODG_PMML, lineNumbers=True)
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1628, in loadfile
    return load(file(fileName), base, validation, dropSpecial, lineNumbers)
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1807, in load
    parser.parse(stream)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 307, in end_element
    self._cont_handler.endElement(name)
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1728, in endElement
    raise XMLValidationError("%sXMLValidationError: %s." % (stacktrace, str(err)))
augustus.core.xmlbase.XMLValidationError: Below is a traceback to the line that caused the actual exception.
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1721, in endElement
    last.validate(recurse=False, exception=True)
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 872, in validate
    self.xsd.validate(self)
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/xmlbase.py", line 1579, in validate
    xml.post_validate()
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/pmml41.py", line 1656, in post_validate
    pmmlApply.top_validate_transformationDictionary(self.transformationDictionary)
  File "/usr/local/lib/python2.7/dist-packages/augustus/core/pmml41.py", line 7092, in top_validate_transformationDictionary
    raise PMMLValidationError("Apply function \"%s\" not recognized (not built-in and not user-defined)" % function)
XMLValidationError: Apply function "formatDateTime" not recognized (not built-in and not user-defined).

Ref:

Example I was trying: https://github.com/codersofthedark/augustus/tree/master/augustus-examples/gaslog/introductory

Augustus: https://code.google.com/p/augustus/

Was it helpful?

Solution

I got the same error. I'm not an expert at Augustus, but it looks the model file, "example_model.pmml" has the function, "formatDateTime", spelled wrong in two places. It should be "formatDatetime" (i.e., "time" should start with a lowercase "t"). When I made that correction, the example ran and produced output in the results directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top