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

Cannot unpack browser-downloaded .conda files #2055

Closed
1 task done
mfansler opened this issue Jan 9, 2024 · 2 comments
Closed
1 task done

Cannot unpack browser-downloaded .conda files #2055

mfansler opened this issue Jan 9, 2024 · 2 comments
Labels

Comments

@mfansler
Copy link
Member

mfansler commented Jan 9, 2024

Conda-forge documentation

  • I could not solve my problem using the conda-forge documentation.

Installed packages

# packages in environment at /Users/mfansler/.local/envs/cph:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h10d778d_5  
ca-certificates           2023.11.17           h8857fd0_0  
cffi                      1.16.0          py312h38bf5a0_0  
conda-package-handling    2.2.0              pyh38be061_0  
conda-package-streaming   0.9.0              pyhd8ed1ab_0  
libexpat                  2.5.0                hf0c8a7f_1  
libffi                    3.4.2                h0d85af4_5  
libsqlite                 3.44.2               h92b6c6a_0  
libzlib                   1.2.13               h8a1eda9_5  
ncurses                   6.4                  h93d8f39_2  
openssl                   3.2.0                hd75f5a5_1  
pip                       23.3.2             pyhd8ed1ab_0  
pycparser                 2.21               pyhd8ed1ab_0  
python                    3.12.1          h9f0c242_1_cpython  
python_abi                3.12                    4_cp312  
readline                  8.2                  h9e318b2_1  
setuptools                69.0.3             pyhd8ed1ab_0  
tk                        8.6.13               h1abcd95_1  
tzdata                    2023d                h0c530f3_0  
wheel                     0.42.0             pyhd8ed1ab_0  
xz                        5.2.6                h775f41a_0  
zstandard                 0.22.0          py312h7a629f7_0  
zstd                      1.5.5                h829000d_0

Environment info

active environment : /Users/mfansler/.local/envs/cph
    active env location : /Users/mfansler/.local/envs/cph
            shell level : 2
       user config file : /Users/mfansler/.condarc
 populated config files : /Users/mfansler/.condarc
          conda version : 23.7.4
    conda-build version : 3.28.2
         python version : 3.9.15.final.0
       virtual packages : __archspec=1=skylake
                          __osx=11.7.10=0
                          __unix=0=0
       base environment : /Users/mfansler/miniconda3  (writable)
      conda av data dir : /Users/mfansler/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/osx-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/mfansler/miniconda3/pkgs
                          /Users/mfansler/.conda/pkgs
       envs directories : /Users/mfansler/miniconda3/envs
                          /Users/mfansler/.conda/envs
               platform : osx-64
             user-agent : conda/23.7.4 requests/2.28.1 CPython/3.9.15 Darwin/20.6.0 OSX/11.7.10
                UID:GID : 501:20
             netrc file : None
           offline mode : False

Issue

Downloading packages on Anaconda Cloud via a web browser (Safari 16.6.1) leads to a file like (for example, from https://anaconda.org/conda-forge/r-tinytex/files):

noarch_r-tinytex-0.49-r43hc72bb7e_0.conda

This fails to unpack with cph

(cph) $ cph x noarch_r-tinytex-0.49-r43hc72bb7e_0.conda 
Traceback (most recent call last):
  File "/Users/mfansler/.local/envs/cph/bin/cph", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/mfansler/.local/envs/cph/lib/python3.12/site-packages/conda_package_handling/cli.py", line 121, in main
    api.extract(args.archive_path, args.dest, prefix=args.prefix)
  File "/Users/mfansler/.local/envs/cph/lib/python3.12/site-packages/conda_package_handling/api.py", line 77, in extract
    format.extract(fn, dest_dir, components=components)
  File "/Users/mfansler/.local/envs/cph/lib/python3.12/site-packages/conda_package_handling/conda_fmt.py", line 46, in extract
    _extract(str(fn), str(dest_dir), components=components)
  File "/Users/mfansler/.local/envs/cph/lib/python3.12/site-packages/conda_package_handling/streaming.py", line 35, in _extract
    stream = package_streaming.stream_conda_component(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mfansler/.local/envs/cph/lib/python3.12/site-packages/conda_package_streaming/package_streaming.py", line 133, in stream_conda_component
    raise LookupError(f"didn't find {component_name} component in {filename}")
LookupError: didn't find info-noarch_r-tinytex-0.49-r43hc72bb7e_0 component in /Users/mfansler/Downloads/noarch_r-tinytex-0.49-r43hc72bb7e_0.conda

However, everything goes smoothly when downloading the file programmatically using the link on the Anaconda Cloud page:

(cph) $ wget https://anaconda.org/conda-forge/r-tinytex/0.49/download/noarch/r-tinytex-0.49-r43hc72bb7e_0.conda
(cph) $ cph x r-tinytex-0.49-r43hc72bb7e_0.conda

This behavior arose in the last few months. Is Anaconda Cloud doing something different when downloading from a web browser?

@mfansler mfansler added the bug label Jan 9, 2024
@mfansler mfansler changed the title Cannot unpack GUI downloaded .conda files Cannot unpack browser-downloaded .conda files Jan 9, 2024
@leofang
Copy link
Member

leofang commented Jan 9, 2024

+1

@isuruf
Copy link
Member

isuruf commented Jan 9, 2024

Please open this issue in https://github.com/conda/infrastructure/

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

No branches or pull requests

3 participants