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

Conda crashed after debug #33

Open
mhshen opened this issue May 28, 2024 · 1 comment
Open

Conda crashed after debug #33

mhshen opened this issue May 28, 2024 · 1 comment

Comments

@mhshen
Copy link

mhshen commented May 28, 2024

After debugging a python/C++ project, I created a new zsh window in vscode, and conda environment fails to activate with the following error message.

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/mh/miniconda3/lib/python3.12/site-packages/conda/exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/home/mh/miniconda3/lib/python3.12/site-packages/conda/cli/main.py", line 109, in main_sourced
        print(activator.execute(), end="")
              ^^^^^^^^^^^^^^^^^^^
      File "/home/mh/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 206, in execute
        return getattr(self, self.command)()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/mh/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 171, in activate
        builder_result = self.build_activate(self.env_name_or_prefix)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/mh/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 349, in build_activate
        return self._build_activate_stack(env_name_or_prefix, False)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/mh/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 439, in _build_activate_stack
        deactivate_scripts = self._get_deactivate_scripts(old_conda_prefix)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/mh/miniconda3/lib/python3.12/site-packages/conda/activate.py", line 771, in _get_deactivate_scripts
        for entry in os.scandir(join(prefix, "etc", "conda", "deactivate.d"))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<frozen posixpath>", line 76, in join
    TypeError: expected str, bytes or os.PathLike object, not NoneType

`$ /home/mh/miniconda3/bin/conda shell.posix activate base`

  environment variables:
                 CIO_TEST=<not set>
                CONDA_EXE=/home/mh/miniconda3/bin/conda
           CONDA_PREFIX_2=/home/mh/miniconda3/envs/cpp
           CONDA_PREFIX_3=/home/mh/miniconda3
         CONDA_PYTHON_EXE=/home/mh/miniconda3/bin/python
               CONDA_ROOT=/home/mh/miniconda3
              CONDA_SHLVL=4
           CURL_CA_BUNDLE=<not set>
          LD_LIBRARY_PATH=/home/mh/software/gurobi1100/linux64/lib:/usr/local/cuda-12.4/lib64
               LD_PRELOAD=<not set>
                     PATH=/usr/local/cuda-12.4/bin:/home/mh/.vscode-
                          server/cli/servers/Stable-
                          dc96b837cf6bb4af9cd736aa3af08cf8279f7685/server/bin/remote-cli:/usr/lo
                          cal/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/
                          local/games:/snap/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=/usr/lib/ssl/certs/ca-certificates.crt

     active environment : None
            shell level : 4
       user config file : /home/mh/.condarc
 populated config files : /home/mh/.condarc
          conda version : 24.4.0
    conda-build version : not installed
         python version : 3.12.2.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.4.0=0
                          __cuda=12.4=0
                          __glibc=2.35=0
                          __linux=6.5.0=0
                          __unix=0=0
       base environment : /home/mh/miniconda3  (writable)
      conda av data dir : /home/mh/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/mh/miniconda3/pkgs
                          /home/mh/.conda/pkgs
       envs directories : /home/mh/miniconda3/envs
                          /home/mh/.conda/envs
               platform : linux-64
             user-agent : conda/24.4.0 requests/2.31.0 CPython/3.12.2 Linux/6.5.0-35-generic ubuntu/22.04.4 glibc/2.35 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
                UID:GID : 1000:1000
             netrc file : /home/mh/.netrc
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>
@sevdesk-ryanp
Copy link

sevdesk-ryanp commented Jun 4, 2024

+1 also running into this issue starting last week

After mode debugging, this is due to an interaction between my packagemanager and vscode-cli in particular. Only triggered when opening vscode from terminal. Most likely due to the fact that a virtualenv is already engaged and the integrated terminal is inherited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants