haddocking / haddock3

Official repo of the modular BioExcel version of HADDOCK
https://www.bonvinlab.org/haddock3
Apache License 2.0
84 stars 28 forks source link

haddock3-copy IsADirectoryError error while copying a run #916

Closed ahmedselim2017 closed 6 days ago

ahmedselim2017 commented 1 week ago

Describe the bug When I try to copy a run (run on a server) on my local machine to rerun haddock3-copy exists with error IsADirectoryError: [Errno 21] Is a directory: 'run2/0_topoaa/cns'.

$ haddock3-copy -r run1 -m 0 1 -o run2
[2024-07-01 06:12:04,897 cli_cp INFO] Reading input run directory
[2024-07-01 06:12:04,897 cli_cp INFO] selected steps: 00_topoaa, 01_rigidbody
[2024-07-01 06:12:04,897 cli_cp INFO] Created directory: [directory of the new run]
[2024-07-01 06:12:04,903 extend_run INFO] Copied run1/00_topoaa -> run2/0_topoaa
[2024-07-01 06:12:05,941 extend_run INFO] Copied run1/01_rigidbody -> run2/1_rigidbody
[2024-07-01 06:12:05,942 extend_run INFO] Copied run1/data/00_topoaa -> run2/data/0_topoaa
[2024-07-01 06:12:05,942 extend_run INFO] Copied run1/data/01_rigidbody -> run2/data/1_rigidbody
Traceback (most recent call last):
  File "/home/ahmedselimuzum/.conda/envs/haddock3/bin/haddock3-copy", line 33, in <module>
    sys.exit(load_entry_point('haddock3', 'console_scripts', 'haddock3-copy')())
  File "/home/ahmedselimuzum/tools/haddock3/src/haddock/clis/cli_cp.py", line 103, in maincli
    cli(ap, main)
  File "/home/ahmedselimuzum/tools/haddock3/src/haddock/clis/cli_cp.py", line 98, in cli
    main(**vars(cmd))
  File "/home/ahmedselimuzum/tools/haddock3/src/haddock/clis/cli_cp.py", line 173, in main
    update_contents_of_new_steps(selected_steps, run_dir, outdir)
  File "/home/ahmedselimuzum/tools/haddock3/src/haddock/gear/extend_run.py", line 274, in update_contents_of_new_steps
    text = file_.read_text()
  File "/home/ahmedselimuzum/.conda/envs/haddock3/lib/python3.9/pathlib.py", line 1266, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/home/ahmedselimuzum/.conda/envs/haddock3/lib/python3.9/pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
IsADirectoryError: [Errno 21] Is a directory: 'run2/0_topoaa/cns'

To Reproduce

  1. Activate the conda environment using conda activate haddock3.
  2. Execute command haddock3-copy -r run1 -m 0 1 -o run2.

Expected behavior Create a copy of run1 called run2.

Additional context

Due to the SLURM queue, I couldn't test haddock3-copy on the server but hopefully, I will be able to test it on the server too in a few hours.

mgiulini commented 1 week ago

Hi, you're running haddock3 in the self_contained = true mode, correct? If you turn it off the command should work.

ahmedselim2017 commented 6 days ago

Yes, I was using self_contained = true, and it works when I don't use it. Thanks!