Error with batch file generating image from workflow

Hi y’all,

i’m having problems figuring out how to automate a workflow. My aim is to have a batch file that is executed automatically on a server every morning, so that my colleagues have access to the resulting image when i’m not at work. The workflow is rather simple, joining four *.csv files, fiddling around with them and outputting a javascript line plot.

I learned that you just have to write a *.txt file with a command line and rename it to *.bat. I did that with the following line:

START my\knime\exe -consoleLog -noexit -reset -nosave -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="dir\of\workflow"

I added -nosave after i noticed that a joiner was randomly deleted after executing it. I executed it a couple of times before without that happening, so that kind of baffled me, but whatever, -nosave prevents that and there is not really a reason to save the workflow anyways.

The *.bat seems to execute correctly until it gets to writing the image file. I set the image writer node to override and it doesn’t matter if i try *.png or *.svg. A file is written, but its broken and i can’t open it.

I guess this is the relevant part of the console log:

ERROR    KNIME-Worker-6-Line Plot 0:40 CEFImageGenerator         Executing script failed after 10 attempts. The script is: 'return document.getElementById('node-SINGLE').contentWindow.knimeLinePlot.getSVG();'

Could it be the javascript line plot node generating a broken image? Because the image writer itself seems to work.

1 Like

I tried it with a Generic Javascript View node. It generates a similar error message and also a broken svg file.

ERROR    KNIME-Worker-0-Generic JavaScript View 0:57 CEFImageGenerator   Executing script failed after 10 attempts. The script is: 'return document.getElementById('node-SINGLE').contentWindow.knimeGenericView.getSVG();'

I am trying the exact same procedure, and it is impossible to generate an image through the Image Writer node by running a batch. Have you had any internal response about this problem?

No, i’m sorry.

I learned that none of the dataviz nodes i found are configurable enough for my purpose anyways and learning all the d3 stuff for the generic javascript node seems to intensive for me right now.

So what i’m doing now is starting knime with a powershell script. The output is an excel-file containing all my important data. The script opens another Excel file after Knime is finished. That one queries the knime generated file and generates all the plots i need as a pdf file. If you don’t know powershell i highly recommend learning some stuff because it is a nice addition to knime if you want to automate stuff.

1 Like