0

I am trying to execute KNIME.exe in (Windows 10) cmd/Python 3. But when there is an error message, I always get a pop-up window instead of displaying them in the cmd/Jupyter Notebook.

Question: Is there any way I can see the error message directly in cmd/Python instead of having the pop-up window?

What I am currently have: enter image description here

My cmd command (with an intentional typo of "-reset"):

knime.exe -noexit -consoleLog -nosplash –application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="C:\Users\username\knime-workspace\cmd_test" -reset

In Python, I just used subprocess.call to call the same command. I got the same pop-up window.

Source I went through:
https://forum.knime.com/t/is-there-a-way-to-execute-knime-workflows-with-python/12174/3?u=howellyu
https://www.knime.com/faq

Please let me know your thoughts. Thank you!
-H

Howell Yu
  • 73
  • 8
  • 2
    The knime info says it's a graphical program, a graphical program is a non console program. – CatCat Oct 09 '18 at 17:52
  • 1
    Please clarify what you mean by *see the error message directly in cmd/Python* - if you want to run a KNIME workflow from a Python program, presumably you actually want to be able to check from within the Python program whether or not the workflow ran OK? What happens if you use the [`2> filename`](https://ss64.com/nt/syntax-redirection.html) option to redirect error output to a file? – nekomatic Oct 18 '18 at 15:29
  • @nekomatic Yes, I want to check the error message from inside Python since if I use subprocess.call to run the cmd command from within Python there is no error message regardless of whether there is an error, since the execution of cmd command in Python is successful. I guess what you mentioned about redirecting error to a file is one way to do it. Thanks! – Howell Yu Oct 18 '18 at 16:40

0 Answers0