akikuno / DAJIN2

🔬 Genotyping tool for genome-edited samples, utilizing nanopore sequencer target sequencing
MIT License
9 stars 0 forks source link

AttributeError: module 'wslPath' has no attribute 'is_windows_path' #23

Closed takeiga closed 8 months ago

takeiga commented 8 months ago

Hi, I faced an error in execution.

I conducted a paired analysis of a control and a sample by following command:

DAJIN2 --control barcode01 --sample barcode02 --allele actc1L_cont_knockin.fa --name 02 --genome xenLae2

but this resulted:

2024-03-26 17:41:54, INFO, barcode01 is now processing...
2024-03-26 17:41:54, ERROR, Catch an Exception. Traceback:
Traceback (most recent call last):
  File "/home/user/miniconda3/envs/dajin2/bin/DAJIN2", line 10, in <module>
    sys.exit(execute())
  File "/home/user/miniconda3/envs/dajin2/lib/python3.10/site-packages/DAJIN2/main.py", line 236, in execute
    execute_single_mode(arguments)
  File "/home/user/miniconda3/envs/dajin2/lib/python3.10/site-packages/DAJIN2/main.py", line 47, in execute_single_mode
    core.execute_control(arguments)
  File "/home/user/miniconda3/envs/dajin2/lib/python3.10/site-packages/DAJIN2/core/core.py", line 26, in execute_control
    ARGS: FormattedInputs = preprocess.format_inputs(arguments)
  File "/home/user/miniconda3/envs/dajin2/lib/python3.10/site-packages/DAJIN2/core/preprocess/input_formatter.py", line 90, in format_inputs
    path_sample, path_control, path_allele = convert_input_paths_to_posix(path_sample, path_control, path_allele)
  File "/home/user/miniconda3/envs/dajin2/lib/python3.10/site-packages/DAJIN2/core/preprocess/input_formatter.py", line 33, in convert_input_paths_to_posix
    sample = io.convert_to_posix(sample)
  File "/home/user/miniconda3/envs/dajin2/lib/python3.10/site-packages/DAJIN2/utils/io.py", line 147, in convert_to_posix
    if wslPath.is_windows_path(path):
AttributeError: module 'wslPath' has no attribute 'is_windows_path'

I'm using Ubuntu20.04 and installed the latest version of DAJIN2 via conda in a new environment without any error.
Please let me know if anyone have idea to fix it.

akikuno commented 8 months ago

@takeiga Thank you for reaching out! It seems that your environment might be running an older version of wslPath so we recommend updating to the latest version:

conda install -c conda-forge -n <your conda env> wslPath=0.4.1

Should you face any issues during the update, please don't hesitate to inform me.

takeiga commented 8 months ago

@akikuno Thank you for your prompt reply! I tried reconstruct environment by your command, but it showed following error and could not reconstruct environment: - nothing provides requested wslpath 0.4.1**

So I installed by pip and this fixed the issue: pip install wslPath==0.4.1

However, I face the same error which I mentioned another thread #24.

akikuno commented 8 months ago

@takeiga Thank you for your effort. I truly appreciate it! I'm pleased to hear that the latest wslPath was installed using pip. If you don't have any further questions, please close the issue and proceed to #24.

The following is just an additional note.

I'm not sure why you couldn't find wslpath 0.4.1 via conda. It might be related to the version of conda. If you upgrade conda, I think the installation should work well.

conda update conda # or conda install -n base -c conda-forge conda=24.3.0
conda --version # check the version as 24.3.0
conda install -c conda-forge -n <your conda env> wslPath=0.4.1
takeiga commented 8 months ago

@akikuno I really applicate your kind support. Yes, I didn't updated conda via conda-forge, so that causing the issue.