Renku run gives Error: Invalid parameter value - Cannot execute command '':

Dear Renku Team.

As a new user of Renku, I have been following the official renku tutorial.
https://renku.readthedocs.io/en/stable/tutorials/first_steps/10_workflow_file.html

My project is on renkulab.io

Everything was working fine till I reached the step requiring to run: renku run workflow.yml
I have been getting an error message:
Error: Invalid parameter value - Cannot execute command ‘’: This is likely because the executable doesn’t exist or has the wrong permissions set.

On my side:
yml file is the same as in the tutorial.
The structure of the folders is also similar.
The permissions for the scripts and files are ok.

I would highly appreciate your help with this issue.
With best regards.

Rostyslav Kuzyakiv MD, PhD
ETHZ Zurich

1 Like

Hi @rkuzyakiv thanks for reporting this and sorry about the confusion! It turns out those particular docs leaked out a little too early into the stable branch of our documentation. The workflow file feature is only being released today! The renku CLI you are using in your project doesn’t have this functionality yet.

You have two options at this point:

  1. upgrade your renku CLI to a version that supports the workflow file feature. Some functionality of the renkulab web application might not work correctly in this case and complain that your project’s renku version is incompatible with the platform. However, you can still launch sessions, push changes etc. Your project will work fine again once we deploy the version released today to renkulab.io next week.

  2. you can refer to 0.21.0 docs until the new release gets to renkulab (~1 week from now)

If you have a session running on renkulab, you can update the CLI in your session by running

$ ~/.renku/venv/pip install renku==1.11.2

To persist this change, you will also want to change the version in the Dockerfile in your project, i.e. modify the line that sets the renku version to read

ARG RENKU_VERSION=1.11.2

Hope that helps! Let me know if you run into any (other) issues!

Hi @rrrrrok Thank you very much for you explanations. I appreciate it a lot. Will give it a try.

Hi @rrrrrok I am writing to follow up on a the issue I had reported to you.
I have tried the steps suggested but the problem persists.
I am still getting the same error message:
Error: Invalid parameter value - Cannot execute command ‘’: This is likely because the executable doesn’t exist or has the wrong permissions set.

Thank you for your prompt attention to this matter.
I look forward to hearing from you soon.
Regards.
Rostyslav

Hi @rkuzyakiv,

could you please post exactly the command you are trying to run together with the full stack trace as well as the output of

$ renku --version

If you are trying to run a workflow file, could you please post that as well? Thanks!!

Oh I just realized I made a typo in my instructions :man_facepalming:

If you are trying to install the new version of Renku, it should be

$ ~/.renku/venv/bin/pip install renku==1.11.2

(note the bin/ which was missing in my original post above!)

Hi @rrrrrok Thank you for the hints. I have applied them. Nothing changed.
My set up:

renku --version
1.11.2

workflow.yml file
name: data-pipeline
steps:
filter:
command: python src/filter.py data/input/flights.csv data/output/filtered.csv
inputs:
- src/filter.py
- data/input/flights.csv
outputs:
- data/output/filtered.csv
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The python scrip filter.py
#!/usr/bin/env python
#coding: utf-8

#Usage: python flights.py

import pandas as pd
import sys

#It would be more robust to use argparse or click, but we want this to be simple
if len(sys.argv) < 3:
sys.exit(“Please invoke with two arguments: input and output paths”)

input_path = sys.argv[1]
output_path = sys.argv[2]

#Read in the data
df = pd.read_csv(input_path)

#Select only flights to Austin (AUS)
df = df[df[‘DEST’] == ‘AUS’]

#Save the result
df.to_csv(output_path, index=False)


after running: renku run ./workflow.yml
the output of print:

Renku version: 1.11.2
OS: Linux (#58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022)
Python: 3.9.12

###Traceback

Traceback (most recent call last):
  File "[...]/site-packages/renku/ui/cli/exception_handler.py", line 133, in main
    return super().main(*args, **kwargs)
  File "[...]/site-packages/renku/ui/cli/exception_handler.py", line 92, in main
    return super().main(*args, **kwargs)
  File "[...]/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "[...]/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "[...]/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "[...]/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "[...]/site-packages/renku/ui/cli/run.py", line 641, in run
    command.with_communicator(communicator)
  File "[...]/site-packages/renku/command/command_builder/command.py", line 252, in execute
    output = self._operation(*args, **kwargs)  # type: ignore
  File "[...]/site-packages/inject/__init__.py", line 342, in injection_wrapper
    return sync_func(*args, **kwargs)
  File "pydantic/decorator.py", line 40, in pydantic.decorator.validate_arguments.validate.wrapper_function
  File "pydantic/decorator.py", line 134, in pydantic.decorator.ValidatedFunction.call
  File "pydantic/decorator.py", line 206, in pydantic.decorator.ValidatedFunction.execute
  File "[...]/site-packages/renku/core/workflow/run.py", line 298, in run_command_line
    return_code = call(
  File "[...]/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "[...]/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "[...]/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: './workflow.yml'

##Additional context
Add any other context about the problem.

I hope you find this info useful.

Best.
Rostyslav

Hi @rkuzyakiv,

I tried now to follow the tutorial myself and with renku version 1.11.2 it works out-of-the-box. I tried to reproduce your error and it took a bit of creativity! Finally I think I figured out what the reason is:

# this works
$ renku run workflow.yml 
Executing step 'flights-processing-pipeline.filter': 'python src/filter.py data/flight-data/2019-01-flights.csv.zip data/output/flights-filtered.csv' ...

$ chmod u+x workflow.yml
$ git commit -am 'update workflow'

# this fails
$ renku run workflow.yml
Error: Invalid parameter value - Cannot execute command '': This is likely because the executable doesn't exist or has the wrong permissions set.
$ renku run ./workflow.yml 
...
OSError: [Errno 8] Exec format error: './workflow.yml'

# this fixes it
$ chmod a-x workflow.yml 
$ renku run ./workflow.yml 
Executing step 'flights-processing-pipeline.filter': 'python src/filter.py data/flight-data/2019-01-flights.csv.zip data/output/flights-filtered.csv' ...

So, to summarize - my guess is that at some point, because renku complained about not being able to execute the workflow you made the file executable - now, with the correct version of renku, since the file is executable, renku tries to run it as an executable instead of interpreting it as a workflow.

tl;dr - run chmod a-x workflow.yml and it should be fine :sweat_smile:

Did: chmod a-x workflow.yml
run: renku run workflow.yml

New error:
File “[…]/site-packages/renku/core/workflow/workflow_file.py”, line 62, in run_workflow_file
workflow = workflow_file.to_plan()
File “[…]/site-packages/inject/init.py”, line 342, in injection_wrapper
return sync_func(*args, **kwargs)
File “[…]/site-packages/renku/core/workflow/model/workflow_file.py”, line 78, in to_plan
project_id = project_gateway.get_project().id
File “[…]/site-packages/renku/infrastructure/gateway/project_gateway.py”, line 33, in get_project
raise ValueError(“Cannot get project”) from e
ValueError: Cannot get project

I am just thinking about killing the current renku session and starting a new one.
I hope it will work. 

Best. 
R