CatChenal / new_conda_env

A different way of cloning a conda environment...
MIT License
5 stars 0 forks source link

FileNotFoundError even when hardcoding the correct directory #13

Open BlackArbsCEO opened 1 month ago

BlackArbsCEO commented 1 month ago

my conda version:

          conda version : 24.7.1
    conda-build version : not installed
         python version : 3.10.14.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.7.1=0
                          __cuda=12.5=0
                          __glibc=2.40=0
                          __linux=6.10.3=0
                          __unix=0=0

command: new-conda-env -old_ver 3.11.9 -new_ver 3.12.5 -env_to_clone retirement_algo -new_env_name ralgo

error:

/mnt/legacy/home/kng_kapital/miniforge3/envs/retirement_algo/envs
new_conda_env.envir.CondaEnvir: ERROR    Typo in <env_to_clone>? Path not found: /mnt/legacy/home/kng_kapital/miniforge3/envs/retirement_algo/envs/retirement_algo)
Traceback (most recent call last):
  File "/mnt/legacy/home/kng_kapital/miniforge3/envs/retirement_algo/bin/new-conda-env", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/mnt/legacy/home/kng_kapital/miniforge3/envs/retirement_algo/lib/python3.11/site-packages/new_conda_env/cli.py", line 126, in main
    conda_vir = envir.CondaEnvir(old_ver=o_ver,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/legacy/home/kng_kapital/miniforge3/envs/retirement_algo/lib/python3.11/site-packages/new_conda_env/envir.py", line 112, in __init__
    raise FileNotFoundError
FileNotFoundError

The Paths don't appear to be correct. It duplicates envs/retirement_algo so I tried to hardcode the correct path just as a test and it generated another error further down the chain.

CatChenal commented 1 month ago

Sorry about that! I found an error a couple of months ago (might be the same one): I have not gotten around to fixing it.

PS: I mask the irrelevant (& private) paths from all tracebacks, when I post in a public forum.