Permission Error When Using Knimepy in Ubuntu 18.04

I tried and succeeded when I try to execute a knime workflow with sending a pandas dataframe for the input and I received expected output. So my code and knime workflow seems to be ok. But when I tried to run this workflow in ubuntu 18.04 I receive this permission error:

ERROR:root:captured stdout: 
ERROR:root:captured stderr: /bin/sh: 1: /home/ggerdan/knime_4.0.0.linux.gtk.x86_64/knime_4.0.0: Permission denied

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/knime.py", line 262, in run_workflow_using_multiple_service_tables
    with open(output_json_filepath) as output_json_fh:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpnm0twvyc/output_12.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "knime_test.py", line 17, in <module>
    wf.execute()
  File "/usr/local/lib/python3.6/dist-packages/knime.py", line 384, in execute
    output_as_pandas_dataframes=output_as_pandas_dataframes,
  File "/usr/local/lib/python3.6/dist-packages/knime.py", line 272, in run_workflow_using_multiple_service_tables
    raise ChildProcessError("Output from KNIME not found")
ChildProcessError: Output from KNIME not found

The error message suggests that your Python code ran the KNIME workflow but it did not find output from that workflow. This is almost always due to something going wrong during the execution of the KNIME workflow itself (hence, no output was produced).

A couple of options for how to investigate this further:

  1. Look through KNIME’s knime.log to see events that led up to this error being reported by knimepy.
  2. As an alternative to #1, you might try running again but enable the option wf.execute(live_passthru_stdout_stderr=True) to see more of the KNIME execution’s logging than just the final error (this might be more convenient than your looking in the knime.log).
  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.
3 Likes

I tried all 3 options but neither the output nor the log file changed

import knime
import pandas as pd


knime.executable_path = r"/home/ggerdan/knime_4.0.0.linux.gtk.x86_64/knime_4.0.0"

data = {}
data["Universe_0_0"] = [0.591]
data["Universe_0_1"] = [0.365]
data["Universe_1_0"] = [0.075]
data["Universe_1_1"] = [0.703]
df = pd.DataFrame(data)

with knime.Workflow(r"/home/ggerdan/knime-workspace/knimepy_test") as wf:
    wf.data_table_inputs[0] = df
    wf.save_after_execution = True
    wf.execute(live_passthru_stdout_stderr=True)
    print(wf.data_table_outputs[0])

Screenshot%20from%202019-09-02%2014-19-06

Is the name of your executable on disk literally /home/ggerdan/knime_4.0.0.linux.gtk.x86_64/knime_4.0.0?

I ask because I am surprised to see the executable named “knime_4.0.0” and not merely “knime” as I more commonly expect to see it on Linux systems.

2 Likes

Of course not :sweat_smile:
I gave the path that contains the executable…
I changed it to “/home/ggerdan/knime_4.0.0.linux.gtk.x86_64/knime_4.0.0/knime”
And now it runs without any error.
Thanks for your time and attention.

1 Like

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