mamba: RuntimeError: The process cannot access the file because it is being used by another process.

Situation: “Direct” connection via ZScaler Client Connector (meaning no proxy) results in following error (extract):

* schannel: server closed abruptly (missing close_notify)
* Closing connection 0
* schannel: shutting down SSL/TLS connection with conda.anaconda.org port 443
INFO    Download error (56) Failure when receiving data from the peer 
[https://conda.anaconda.org/t/bi-90f4987e-2968-45da-be84-5489ed301a9f/conda-forge/win-64/repodata.json]

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

Traceback (most recent call last):
  File "c:\Apps\mambaforge\lib\site-packages\conda\exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "c:\Apps\mambaforge\lib\site-packages\mamba\mamba.py", line 898, in exception_converter
    raise e
  File "c:\Apps\mambaforge\lib\site-packages\mamba\mamba.py", line 892, in exception_converter
    exit_code = _wrapped_main(*args, **kwargs)
  File "c:\Apps\mambaforge\lib\site-packages\mamba\mamba.py", line 851, in _wrapped_main
    result = do_call(args, p)
  File "c:\Apps\mambaforge\lib\site-packages\mamba\mamba.py", line 736, in do_call
    exit_code = create(args, parser)
  File "c:\Apps\mambaforge\lib\site-packages\mamba\mamba.py", line 640, in create
    return install(args, parser, "create")
  File "c:\Apps\mambaforge\lib\site-packages\mamba\mamba.py", line 515, in install
    index = load_channels(pool, channels, repos)
  File "c:\Apps\mambaforge\lib\site-packages\mamba\utils.py", line 100, in load_channels
    index = get_index(
  File "c:\Apps\mambaforge\lib\site-packages\mamba\utils.py", line 81, in get_index
    is_downloaded = dlist.download(True)
RuntimeError: The process cannot access the file because it is being used by another process.
: 'C:\Users\USER1\AppData\Local\Temp\mambafAbbTKMtUXf'

`$ c:\Apps\mambaforge\Scripts\mamba create --name test1 python=3.8 -vvv -y`

Full -vvv log here.

The strange bits are:

  1. Exactly the same prompt but with conda instead, results in no errors. Env gets created.: $ c:\Apps\mambaforge\Scripts\conda create --name test1 python=3.8 -vvv -y

  2. Connected to VPN with http/s proxies set, both mamba and conda work as expected with no errors.

  3. First json file: conda-forge/noarch/repodata.json gets downloaded while second file conda-forge/win-64/repodata.json chokes… with error above… INFO Finalized transfer: https://conda.anaconda.org/t/bi-90f4987e-2968-45da-be84-5489ed301a9f/conda-forge/noarch/repodata.json

Note: Package dirs cleaned between multiple tests: mamba clean --all -y --force-pkgs-dirs

Any pointers to a solution are very much welcome!

Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

@xhochy fixed this issue recently

I suggest renaming this issue to “Windows: File is being used by another process” or similar