# Strange Error in publishing output of NEXTFLOW

**URL:** <https://community.seqera.io/t/strange-error-in-publishing-output-of-nextflow/862>\
**Category:** Ask for help\
**Created:** [June 18, 2024, 7:12pm UTC](https://community.seqera.io/t/strange-error-in-publishing-output-of-nextflow/862 "2024-06-18T19:12:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iman\_Nazari](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/iman_nazari/32/611_2.png) [@Iman\_Nazari](https://community.seqera.io/u/Iman_Nazari)\
**Post date:** [June 18, 2024, 7:12pm UTC](https://community.seqera.io/t/strange-error-in-publishing-output-of-nextflow/862/1 "2024-06-18T19:12:57Z")

</div>

Dears,

i have written a pipeline in nextflow and on the subset of the data it works well, but when i used the whole dataset strange error in publishsing the output data at the final step pops up. detail of that mentioned here:

my last process in nextflow:

```auto
process Genepy_score {
    publishDir "${params.output}/Genepy_score/Genepy2_score", mode: "copy", overwrite: true
    input:
    path("Meta_files")

    output:
    path("*")

    script:
    """
    
    source activate drop
    mkdir -p Genepy2_score
    python "${params.genepy_py}" "Meta_files" "Genepy2_score"
    """
}

```

```auto
######### Error:
Jun-18 19:50:25.911 [PublishDir-41] DEBUG nextflow.processor.PublishDir - Failed to publish file: /Nextflow/next_test/ttt2/ibdplexus.recalibrated/work/98/5e5cca770739477501ef3130b45307/Genepy2_score; to: /Nextflow/next_test/ttt2/ibdplexus.recalibrated/Results/Genepy_score/Genepy2_score/Genepy2_score [copy] -- attempt: 1; reason: /Nextflow/next_test/ttt2/ibdplexus.recalibrated/Results/Genepy_score/Genepy2_score/Genepy2_score/ENSG00000114124.3_GRK7_._.meta.txt

ERROR nextflow.processor.PublishDir - Failed to publish file: /Nextflow/next_test/ttt2/ibdplexus.recalibrated/work/20/aea26e000f573e86e7b8482ac85139/Genepy2_score; to: /Nextflow/next_test/ttt2/ibdplexus.recalibrated/Results/Genepy_score/Genepy2_score/Genepy2_score [copy] -- See log file for details
dev.failsafe.FailsafeException: java.nio.file.DirectoryNotEmptyException: /Nextflow/next_test/ttt2/ibdplexus.recalibrated/Results/Genepy_score/Genepy2_score/Genepy2_score

#################################

```

basically the gene which mentioned there doesnt exist in the mentioned work directory!!!

any helps?

thank you
