Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SameFileError when running snakemake --gernerate-unit-tests #1153

Closed
lenaschneehas opened this issue Aug 25, 2021 · 0 comments
Closed

SameFileError when running snakemake --gernerate-unit-tests #1153

lenaschneehas opened this issue Aug 25, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@lenaschneehas
Copy link

lenaschneehas commented Aug 25, 2021

Dear all,

Snakemake version
I'm using the snakemake version 6.6.0

Describe the bug
I encounter the following error when I try to run a unit test on the our pipeline:

Tries to copy the file from the original location to the same locations instead of into units folder.

Logs
Building DAG of jobs...
Generating unit tests for each rule...
Generating unit test for rule all: .tests/unit/test_all.py.
Generating unit test for rule report_qc: .tests/unit/test_report_qc.py.
Traceback (most recent call last):
File "/home/user/anaconda3/envs/testenv/lib/python3.8/site-packages/snakemake/__init__.py", line 699, in snakemake
success = workflow.execute(
File "/home/user/anaconda3/envs/testenv/lib/python3.8/site-packages/snakemake/workflow.py", line 857, in execute
unit_tests.generate(
File "/home/user/anaconda3/envs/testenv/lib/python3.8/site-packages/snakemake/unit_tests/__init__.py", line 89, in generate
copy_files(job.input, "data")
File "/home/user/anaconda3/envs/testenv/lib/python3.8/site-packages/snakemake/unit_tests/__init__.py", line 83, in copy_files
shutil.copy(f, target)
File "/home/user/anaconda3/envs/testenv/lib/python3.8/shutil.py", line 418, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/home/user/anaconda3/envs/testenv/lib/python3.8/shutil.py", line 244, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: PosixPath('/home/common/data/output/projects/intermediate_output/merge_clusterings.rds') and '/home/data/output/projects/intermediate_output/merge_clusterings.rds' are the same file

Minimal example
snakemake --profile /PATH_TO_CONFIG/config/profile --conda-frontend conda --generate-unit-tests
Additional context

Any help is appreciated!

Lena

@lenaschneehas lenaschneehas added the bug Something isn't working label Aug 25, 2021
@lenaschneehas lenaschneehas changed the title Problems running snkae make unit test with .html input files Problems running snkae make unit test with .html input files and config Aug 25, 2021
@lenaschneehas lenaschneehas changed the title Problems running snkae make unit test with .html input files and config SameFileError when running snakemake --gernerate-unit-tests Aug 31, 2021
@stydodt stydodt mentioned this issue Oct 15, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant