Cannot execute KNIME workflow within python (ChildProcessError: Output from KNIME not found)

Hi guys,

Referring to Error when using knimepy from jupyter - #4 by potts, I also face the same error message.
Yet, I am not using an Input Container, i.e. sending data from python to KNIME. I just want to use the Output from a KNIME workflow.

As described in the other post, missing values can cause problems. I tried to anticipate this issue by plugging a “missing value” node before the output container. Yet, I still get the error message:

ChildProcessError : Output from KNIME not found

Any suggestions? Do I always have to provide an Input Table Container as well?

KNIME WF:

Error message in python:

FileNotFoundError Traceback (most recent call last) ~\AppData\Local\Programs\Python\Python37\lib\site-packages\knime.py in run_workflow_using_multiple_service_tables**(input_datas, path_to_knime_executable, path_to_knime_workflow, input_service_table_node_ids, output_service_table_node_ids, save_after_execution, live_passthru_stdout_stderr, output_as_pandas_dataframes, input_json_filename_pattern, output_json_filename_pattern)** 285 for output_json_filepath in expected_output_json_files**:** → 286 with open**(** output_json_filepath**)** as output_json_fh**:** 287 single_node_knime_output = json**.** load**(** output_json_fh**)**

FileNotFoundError : [Errno 2] No such file or directory: ‘C:\Users\xxx\AppData\Local\Temp\tmp1g9e23cs\output_181.json’ During handling of the above exception, another exception occurred:

ChildProcessError Traceback (most recent call last) c:\Users\xxx\vsc_python\xxxx\import_knime.py in [12](file:///C:/Users/xxx/vsc_python/xxxx/import_knime.py?line=11) with knime**.** Workflow**(** workflow_path**=** workflow_data_prep**,** workspace_path**=** workspace**)** as wf**:** [13](file:///C:/Users/xxx/vsc_python/xxxx/import_knime.py?line=12) wf**.** save_after_execution = True ----> [14](file:///C:/Users/xxx/vsc_python/xxxx/import_knime.py?line=13) wf**.** execute**(** ) [15](file:///C:/Users/xxx/vsc_python/xxx/import_knime.py?line=14) results = wf**.** data_table_outputs**[** 0 ] [16](file:///C:/Users/xxx/vsc_python/xxxx/import_knime.py?line=15)

~\AppData\Local\Programs\Python\Python37\lib\site-packages\knime.py in execute**(self, live_passthru_stdout_stderr, output_as_pandas_dataframes)** 417 save_after_execution**=** self**.** save_after_execution**,** 418 live_passthru_stdout_stderr**=** live_passthru_stdout_stderr**,** → 419 output_as_pandas_dataframes**=** output_as_pandas_dataframes**,** 420 ) 421 self**.** _data_table_outputs**[** : ] = outputs

~\AppData\Local\Programs\Python\Python37\lib\site-packages\knime.py in run_workflow_using_multiple_service_tables**(input_datas, path_to_knime_executable, path_to_knime_workflow, input_service_table_node_ids, output_service_table_node_ids, save_after_execution, live_passthru_stdout_stderr, output_as_pandas_dataframes, input_json_filename_pattern, output_json_filename_pattern)** 297 logging**.** error**(** f"captured stdout: {result.stdout}" ) 298 logging**.** error**(** f"captured stderr: {result.stderr}" ) → 299 raise ChildProcessError**(** “Output from KNIME not found” ) 300 301 if output_as_pandas_dataframes**:**

ChildProcessError : Output from KNIME not found

Hi @Residentstiefel

No, you do not need to have a Container Input (Table) node in your workflow. It is permissible to use zero, one, two, … or as many Container Input (Table) nodes as you wish in a single workflow.

Two of the three suggestions, stolen from that forum post you linked to earlier, might help you:

… how to investigate this further:

  1. Looking through KNIME’s knime.log before this error occurs may help identify what led up to it.
  2. Try running again but enable the option wf.execute(live_passthru_stdout_stderr=True) to see more in Jupyter of the KNIME execution’s logging than just the final error.
  3. Try changing wf.save_after_execution to True and then after the failed execution, open the workflow in KNIME again to see its final state – you can then investigate the final state of the various nodes through KNIME in the usual way.

You have already shared information that would be visible by performing #2 but there are very likely other relevant clues available to you through #1. You might find #3 to be the quickest way to investigate further because the most likely reason there was no output from your workflow’s execution is that an error occurred in one of the nodes and it never truly reached the point of executing the Container Output (Table) node. Pursuing #3 would mean you can open the failed-to-cleanly-execute workflow in KNIME and visually identify which node had troubles.

Hope this helps.

Davin

3 Likes

Hi @potts ,

Thanks for the guidance here. I tried to apply all steps and it seemed that the process already stopped at the wf.execute() step, as #3 did not display any results. The nodes were all idle.

What I did now was to install Version 4.4. of KNIME and it now miraculously works :slight_smile:

Thanks alot and best regards,
Stiefel

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.