Skip to content

mamba shell activate & mamba shell hook returning randomly truncated output #823

@Linloir

Description

@Linloir

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

My powershell randomly fails when starting after I used mamba shell init --shell powershell with the following output:

Invoke-Expression : 无法将参数绑定到参数Command,因为该参数为空字符串。
所在位置 C:\Users\linloir\Documents\WindowsPowerShell\profile.ps1:6 字符: 92
+ ... wershell' -r $Env:MAMBA_ROOT_PREFIX) | Out-String | Invoke-Expression
+                                                         ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:PSObject) [Invoke-Expression],ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Invo
   keExpressionCommand
Image

After some research, I found that it seems that some mamba shell commands are returning wierdly, randomly truncated outputs:

Image Image

I've tried restarting my computer, re-opening powershell, and re-installing mamba, neither of them had made a difference.

Installed packages

-text
(base) PS C:\Users\linloir> conda list
# packages in environment at C:\Users\linloir\miniforge3:
#
# Name                    Version                   Build  Channel
archspec                  0.2.5              pyhd8ed1ab_0    conda-forge
boltons                   25.0.0             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py312h275cf98_3    conda-forge
bzip2                     1.0.8                h2466b09_7    conda-forge
ca-certificates           2025.7.14            h4c7d964_0    conda-forge
certifi                   2025.7.14          pyhd8ed1ab_0    conda-forge
cffi                      1.17.1          py312h4389bb4_0    conda-forge
charset-normalizer        3.4.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_1    conda-forge
conda                     25.3.1          py312h2e8e312_1    conda-forge
conda-libmamba-solver     25.3.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.4.0              pyh7900ff3_2    conda-forge
conda-package-streaming   0.12.0             pyhd8ed1ab_0    conda-forge
cpp-expected              1.1.0                hc790b64_1    conda-forge
distro                    1.9.0              pyhd8ed1ab_1    conda-forge
fmt                       11.1.4               h5f12afc_1    conda-forge
frozendict                2.4.6           py312h4389bb4_0    conda-forge
h2                        4.2.0              pyhd8ed1ab_0    conda-forge
hpack                     4.1.0              pyhd8ed1ab_0    conda-forge
hyperframe                6.1.0              pyhd8ed1ab_0    conda-forge
idna                      3.10               pyhd8ed1ab_1    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_1    conda-forge
jsonpointer               3.0.0           py312h2e8e312_1    conda-forge
krb5                      1.21.3               hdf4eb48_0    conda-forge
libarchive                3.7.7                h5343c79_4    conda-forge
libcurl                   8.14.1               h88aaa65_0    conda-forge
libexpat                  2.7.1                hac47afa_0    conda-forge
libffi                    3.4.6                h537db12_1    conda-forge
libiconv                  1.18                 h135ad9c_1    conda-forge
liblzma                   5.8.1                h2466b09_2    conda-forge
libmamba                  2.1.1                h00a3e12_0    conda-forge
libmambapy                2.1.1           py312h259b449_0    conda-forge
libsolv                   0.7.34               h8883371_0    conda-forge
libsqlite                 3.50.3               hf5d6505_1    conda-forge
libssh2                   1.11.1               h9aa295b_0    conda-forge
libxml2                   2.13.8               h442d1da_0    conda-forge
libzlib                   1.3.1                h2466b09_2    conda-forge
lz4-c                     1.10.0               h2466b09_1    conda-forge
lzo                       2.10              hcfcfb64_1001    conda-forge
mamba                     2.1.1                hbfb34a1_0    conda-forge
menuinst                  2.3.1           py312hbb81ca0_0    conda-forge
miniforge_console_shortcut 1.0                  h57928b3_0    conda-forge
nlohmann_json             3.11.3               he0c23c2_1    conda-forge
openssl                   3.5.1                h725018a_0    conda-forge
packaging                 25.0               pyh29332c3_1    conda-forge
pip                       25.1.1             pyh8b19718_0    conda-forge
platformdirs              4.3.8              pyhe01879c_0    conda-forge
pluggy                    1.6.0              pyhd8ed1ab_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6           py312h4389bb4_2    conda-forge
pycparser                 2.22               pyh29332c3_1    conda-forge
pysocks                   1.7.1              pyh09c184e_7    conda-forge
python                    3.12.11         h3f84c4b_0_cpython    conda-forge
python_abi                3.12                    8_cp312    conda-forge
reproc                    14.2.5.post0         h2466b09_0    conda-forge
reproc-cpp                14.2.5.post0         he0c23c2_0    conda-forge
requests                  2.32.4             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.18.14         py312h4389bb4_0    conda-forge
ruamel.yaml.clib          0.2.8           py312h4389bb4_1    conda-forge
setuptools                80.9.0             pyhff2d567_0    conda-forge
simdjson                  3.12.3               hc790b64_0    conda-forge
tk                        8.6.13               h2c6b04d_2    conda-forge
tqdm                      4.67.1             pyhd8ed1ab_1    conda-forge
truststore                0.10.1             pyh29332c3_0    conda-forge
tzdata                    2025b                h78e105d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_1    conda-forge
urllib3                   2.5.0              pyhd8ed1ab_0    conda-forge
vc                        14.3                h41ae7f8_31    conda-forge
vc14_runtime              14.44.35208         h818238b_31    conda-forge
vcomp14                   14.44.35208         h818238b_31    conda-forge
wheel                     0.45.1             pyhd8ed1ab_1    conda-forge
win_inet_pton             1.1.0              pyh7428d3b_8    conda-forge
yaml-cpp                  0.8.0                he0c23c2_0    conda-forge
zstandard                 0.23.0          py312h4389bb4_2    conda-forge
zstd                      1.5.7                hbeecb71_2    conda-forge

Environment info

(base) PS C:\Users\linloir> mamba info

       libmamba version : 2.1.1
          mamba version : 2.1.1
           curl version : libcurl/8.14.1 Schannel zlib/1.3.1 libssh2/1.11.1
     libarchive version : libarchive 3.7.7 zlib/1.3.1 liblzma/5.8.1 bz2lib/1.0.8 liblz4/1.10.0 libzstd/1.5.7
       envs directories : C:\Users\linloir\miniforge3\envs
          package cache : C:\Users\linloir\miniforge3\pkgs
                          C:\Users\linloir\.mamba\pkgs
                          C:\Users\linloir\AppData\Roaming\.mamba\pkgs
            environment : base (active)
           env location : C:\Users\linloir\miniforge3
      user config files : C:\Users\linloir\.mambarc
 populated config files : C:\Users\linloir\miniforge3\.condarc
       virtual packages : __win=10.0.26100=0
                          __archspec=1=x86_64_v4
               channels : https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/conda-forge/win-64
       base environment : C:\Users\linloir\miniforge3
               platform : win-64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions