I'm trying to export PCA nugget to an HTML file using Python, but I get this error while trying to do so.
Script error (Cannot export '"Factor_Analysis":factor[model@id5YWTDKXKEW9]' with the format 'HTML')
I used the following piece of code to get the HTML output, which threw me an error (as mentioned above), but I was successfully able to export the PMML file for K-Means node with the same code [file format - XML and changed the nugget ID ].
taskrunner.exportModelToFile(stream.findByID("id7VBSU9JC1BY").createModelOutput(True), "D:\\factor_out.html", modeler.api.FileFormat.HTML)
I'm using Modeler 16.0. Any help on how to achieve this will be greatly appreciated.
For me it works without any problem. Are you sure you have the ID of your nugget, and not of your model building node?
Here is the complete code I run:
import modeler.api taskrunner = modeler.script.session().getTaskRunner() stream = modeler.script.stream() taskrunner.exportModelToFile(stream.findByID("id4XXRPL55JRK").createModelOutput(True), "D:\\factor_out.html", modeler.api.FileFormat.HTML)