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

ImportError: cannot import name 'itervalues' from 'conda.common.compat' #4484

Closed
4 tasks done
mxmlnkn opened this issue May 28, 2022 · 1 comment
Closed
4 tasks done
Labels
duplicate indicate issues/PRs that are duplicates of another locked [bot] locked due to inactivity severity::1 blocker; broken functionality with no workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type type::tech-debt identifies or resolves some technical debt

Comments

@mxmlnkn
Copy link

mxmlnkn commented May 28, 2022

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a solution or duplication
  • I already searched in Google and didn't find any good information or help
  • I looked at the docs and didn't see anything to help

What happened?

I tried to push to my repo and my Github Actions, which worked just fine last time, failed.

My GA workflow:
jobs:
  Build-Conda:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
    steps:
    - uses: actions/checkout@v2
    - uses: conda-incubator/setup-miniconda@v2
      with:
        auto-update-conda: true
    - name: Build Conda Packages
      run: |
        conda install conda-build anaconda-client conda-verify
        conda config --set anaconda_upload no
        cd conda
        conda build .
Error message:
Packaging indexed_bzip2
INFO:conda_build.build:Packaging indexed_bzip2-1.3.1-h2bc3f7f_0
Packaging indexed_bzip2-1.3.1-h2bc3f7f_0
Traceback (most recent call last):
number of files: 5
  File "/usr/share/miniconda/bin/conda-build", line 11, in <module>
    sys.exit(main())
Warning: rpath /usr/share/miniconda/conda-bld/indexed_bzip2_1653731500646/_build_env/lib is outside prefix /usr/share/miniconda/conda-bld/indexed_bzip2_1653731500646/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold (removing it)
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/cli/main_build.py", line 488, in main
    execute(sys.argv[1:])
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/cli/main_build.py", line 477, in execute
    outputs = api.build(args.recipe, post=args.post, test_run_post=args.test_run_post,
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/api.py", line 186, in build
    return build_tree(
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/build.py", line 3088, in build_tree
    packages_from_this = build(metadata, stats,
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/build.py", line 2371, in build
    newly_built_packages = bundlers[pkg_type](output_d, m, env, stats)
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/build.py", line 1664, in bundle_conda
    files = post_process_files(metadata, initial_files)
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/build.py", line 1510, in post_process_files
    post_build(m, new_files, build_python=python)
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/post.py", line 1314, in post_build
    check_overlinking(m, files, host_prefix)
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/post.py", line 1220, in check_overlinking
    return check_overlinking_impl(m.get_value('package/name'),
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/post.py", line 1044, in check_overlinking_impl
    packages = dists_from_names(requirements_run, run_prefix)
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/post.py", line 635, in dists_from_names
    pkgs = linked_data_no_multichannels(prefix)
  File "/usr/share/miniconda/lib/python3.9/site-packages/conda_build/utils.py", line 2084, in linked_data_no_multichannels
    from conda.common.compat import itervalues
ImportError: cannot import name 'itervalues' from 'conda.common.compat' (/usr/share/miniconda/lib/python3.9/site-packages/conda/common/compat.py)
Error: Process completed with exit code 1.

It seems that the cause is conda/conda#11364.

Using:

conda install conda=4.12.0 conda-build anaconda-client conda-verify

instead of

conda install conda-build anaconda-client conda-verify

fixes the problem.

@mxmlnkn mxmlnkn added the type::bug describes erroneous operation, use severity::* to classify the type label May 28, 2022
@kenodegard kenodegard transferred this issue from conda/conda May 28, 2022
@kenodegard kenodegard added duplicate indicate issues/PRs that are duplicates of another type::tech-debt identifies or resolves some technical debt severity::1 blocker; broken functionality with no workaround source::community catch-all for issues filed by community members labels May 28, 2022
@kenodegard
Copy link
Contributor

@mxmlnkn This is a known issue and a duplicate of #4481 and will be addressed in the upcoming conda-build 3.21.9 release (see #4483).

@kenodegard kenodegard closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2022
@kenodegard kenodegard moved this to Done in 🧭 Planning May 28, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate indicate issues/PRs that are duplicates of another locked [bot] locked due to inactivity severity::1 blocker; broken functionality with no workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type type::tech-debt identifies or resolves some technical debt
Projects
Archived in project
Development

No branches or pull requests

2 participants