# Renku-python v1.0.1: Output path recognized as output instead of output file

**URL:** <https://renku.discourse.group/t/renku-python-v1-0-1-output-path-recognized-as-output-instead-of-output-file/506>\
**Category:** Renku (CLI)\
**Created:** [13 December 2021 09:46 UTC](https://renku.discourse.group/t/renku-python-v1-0-1-output-path-recognized-as-output-instead-of-output-file/506 "2021-12-13T09:46:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Almut](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/almut/32/184_2.png) [@Almut](https://renku.discourse.group/u/Almut)\
**Post date:** [13 December 2021 09:46 UTC](https://renku.discourse.group/t/renku-python-v1-0-1-output-path-recognized-as-output-instead-of-output-file/506/1 "2021-12-13T09:46:18Z")

</div>

Hi all,

this is slightly connected to [this post](https://renku.discourse.group/t/renku-python-v1-0-1-possible-feature-automatic-output-detection-for-parameter-executions-of-workflows/505), but a more general problem.

I’m running a workflow, where I don’t know the explicit output name when calling `renku run` using renku-python version **1.0.1**. Usually renku does automatically detect all new files and I don’t need to worry about explicitly specifying the output. In this case I parse the path to the output file as command line option. Renku seems to detect the output path as output instead of the actual output file. This gives rise to problems when executing the workflow with a different set of parameter etc. and will also not work if files exist in the output directory.

[In this project](https://renkulab.io/projects/almut.lue/test-flow) I have a test case (workflow `param_5`):  
The test script (src/parameter\_outpath2.sh) has two input arguments `-o`, which is the path to the output file and `-p` with some parameter to write to to the output file’s content.  
When I run it using:

```auto
renku run --name param_5 -- bash src/parameter_outpath2.sh -o "data/test2" -p "test outpath"

```

a workflow is generated, but I get this note:

 ![Screenshot from 2021-12-13 10-01-29](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/b54ff47174003abffd743158427b91d2ac36ff8d.png)

and `renku workflow show` looks like:

 ![Screenshot from 2021-12-13 10-01-39](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/98ffb07190dd1046ba9c5c497d855a42ed7cff9f.png)

with the output directory defined as output instead of the output file itself.  
Interestingly the same happens when running `renku run` with `--no-output-detection` and explicitly specifying the output file:

 ![Screenshot from 2021-12-13 10-37-44](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/41c815ad114403a00c393e6db8bdcc03839c2fb6.jpeg)

Is there a way to circumvent this problem and call `renku run` while parsing the output path to the script to run, e.g., by being recognized as parameter instead of output?

Best,  
Almut

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [13 December 2021 14:39 UTC](https://renku.discourse.group/t/renku-python-v1-0-1-output-path-recognized-as-output-instead-of-output-file/506/2 "2021-12-13T14:39:45Z")

</div>

Hi @Almut,

Thanks for reaching to us with this issue!

Renku tries to guess inputs and outputs based on the parameters that are passed in the command line. Since `data/test2` is passed, renku uses it as an output instead of the file inside it.

At the moment, it’s not possible to mark a command line argument as a workflow parameter. I’ll create a story for your use-case to either allow defining parameters or not requiring an empty directory when doing run/rerun.

Meanwhile, you can try to disable both input and output detection and pass them as explicits:

```auto
renku run --name param_7 --no-input-detection --no-output-detection --input src/parameter_outpath2.sh --output data/test3/test_out2.txt -- bash src/parameter_outpath2.sh -o data/test3 -p test outpath

```

This generates the following workflow:

```auto
$ renku workflow show param_7
Id: /plans/88b67dc129ea445bb38eb7b797b79767
Name: param_7
Command: bash src/parameter_outpath2.sh -p test outpath
Success Codes: 
Inputs: 
        - input-1:
                Default Value: src/parameter_outpath2.sh
                Position: 1
Outputs: 
        - output-1a33:
                Default Value: data/test3/test_out2.txt
                Position: None
Parameters: 
        - p-3:
                Default Value: test
                Position: 3
                Prefix: -p 
        - parameter-4:
                Default Value: outpath
                Position: 4

```

Kind regard,  
Mohammad
