problem in external tools lab

Hi all,

I'm new in Knime, using Knime 2.8.1 on Windows 7. I'm trying to execute external program "openbabel" by the "external tools lab" node, the problem is, I can not get the output from the output port of the node. Instead, I get the output on the specified folder and file name on my directory. I receive in KNIME the same input file every time poped out from the output port of the node with an error "WARN    OutputDataHandle$FileOutputDataHandle     Could not delete file...".

I set the command arguments on the node: babel -isd %inFile% -d -osd %outFile%

I've checked for access permission to that folder, tried to "write table to disc" from memory policy, still the problem persists. I even can not delete the file from the folder except after closing knime!

The same problem persists when using different external programs.

Can any one please help me?

Thanks,

Tamer

What about using the OpenBabel node? It's in the Chemistry Add-ons extension.

Thanks Thor for such a suggestion. However, the problem is still persisting when trying to execute other programs, like Libmcs of chemaxon! what do you think what could be the problem?

Without more information (e.g. the full error message and an excerpt from the log file) this is hard to diagnose.

Here we go part of the log file:"2013-11-08 15:52:58,536 DEBUG KNIME-Exttool-9 CommandExecution : Launching command: 'libmcs.bat C:\Users\Tamer\Desktop\pipline_test\knime_test_chemotype\inFile.sdf -e -n 9 -o C:\Users\Tamer\Desktop\pipline_test\knime_test_chemotype\outFile.sdf'
2013-11-08 15:53:00,566 DEBUG KNIME-Exttool-9 CommandExecution : External commands terminated with exit code: 0
2013-11-08 15:53:00,586 DEBUG KNIME-Exttool-9 Buffer : Buffer file (C:\Users\Tamer\AppData\Local\Temp\knime_test222477\knime_container_20131108_5223558492582300469.bin.gz) is 0,017MB in size
2013-11-08 15:53:00,586 DEBUG KNIME-Exttool-9 Buffer : Opening input stream on file "C:\Users\Tamer\AppData\Local\Temp\knime_test222477\knime_container_20131108_5223558492582300469.bin.gz", 1 open streams
2013-11-08 15:53:00,586 DEBUG KNIME-TableIO-19 MemoryObjectTracker : Adding org.knime.core.data.container.Buffer$BufferMemoryReleasable (8 in total)
2013-11-08 15:53:00,596 DEBUG KNIME-Exttool-9 Buffer : Closing input stream on "C:\Users\Tamer\AppData\Local\Temp\knime_test222477\knime_container_20131108_5223558492582300469.bin.gz", 0 remaining
2013-11-08 15:53:00,596 DEBUG KNIME-Worker-27 Buffer : Opening input stream on file "C:\Users\Tamer\AppData\Local\Temp\knime_test222477\knime_container_20131108_7240805383635600363.bin.gz", 2 open streams
2013-11-08 15:53:00,596 DEBUG KNIME-TableIO-19 MemoryObjectTracker : Adding org.knime.core.data.container.Buffer$BufferMemoryReleasable (9 in total)
2013-11-08 15:53:00,596 DEBUG KNIME-Worker-27 Buffer : Closing input stream on "C:\Users\Tamer\AppData\Local\Temp\knime_test222477\knime_container_20131108_7240805383635600363.bin.gz", 1 remaining
2013-11-08 15:53:00,596 WARN  KNIME-Worker-27 OutputDataHandle$FileOutputDataHandle : Could not delete file "C:\Users\Tamer\Desktop\pipline_test\knime_test_chemotype\outFile.sdf"
2013-11-08 15:53:00,596 INFO  KNIME-Worker-27 LocalNodeExecutionJob : External Tool (Labs) 0:7 End execute (2 secs)
2013-11-08 15:53:00,596 DEBUG KNIME-Worker-27 WorkflowManager : External Tool (Labs) 0:7 doBeforePostExecution
2013-11-08 15:53:00,596 DEBUG KNIME-Worker-27 NodeContainer : External Tool (Labs) 0:7 has new state: POSTEXECUTE
2013-11-08 15:53:00,606 DEBUG KNIME-Worker-27 WorkflowManager : External Tool (Labs) 0:7 doAfterExecute - success
2013-11-08 15:53:00,606 DEBUG KNIME-Worker-27 NodeContainer : External Tool (Labs) 0:7 has new state: EXECUTED
2013-11-08 15:53:00,606 DEBUG KNIME-Worker-27 NodeContainer : test2 0 has new state: EXECUTED
2013-11-08 15:53:00,606 DEBUG KNIME-WFM-Parent-Notifier NodeContainer : ROOT  has new state: IDLE
2013-11-08 15:53:01,708 DEBUG main NodeContainerEditPart : External Tool (Labs) 0:7 (EXECUTED)
2013-11-08 15:53:01,708 DEBUG main NodeContainerEditPart : SDF Reader 0:6 (EXECUTED)
2013-11-08 15:53:02,008 DEBUG main NodeContainerEditPart : External Tool (Labs) 0:7 (EXECUTED)"

The error message also is as the "WARN" line. what do you think the problem is?

Hello,

Could it be that you are executing the .bat file and one of its processes keeps the output file open? Maybe with "C:\Windows\System32\cmd.exe libmcs.bat" it would wait?

Cheers, gabor

Gabor may be right, someone still has the file open. Can you try to delete it by hand (in the Windows Explorer) right after you get the warning in KNIME?

Thanks gabor, however, i tried that and it did not work, the node was just frozen at 10%.

thor, I tried to delete it by hand in we, but it can not be deleted. To delete it, i should close knime!

so, what do u think the problem is?

Ah, sorry, I missed the /c switch. Could you try "c:\windows\system32\cmd.exe /c yourbat.bat"? To give a more informed guess, could you share the content of the batch file you would like to execute?

Thanks, gabor

Thanks gabor, still I have the same problem even with "\c" switch. The bat file of libMCS of chemaxon is more than 247 lines, I went through it, it looks that it sets many variables/paths first and then execute the command! But i dunno which part I should copy here?!

I think if there are lines starting with "start", those might be suspicious. If there is a variable containing start that makes it harder to find those lines. (You can check this thread on stackoverflow.)