Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

solver.py KeyError #350

Open
siebrenf opened this issue Jun 19, 2023 · 3 comments
Open

solver.py KeyError #350

siebrenf opened this issue Jun 19, 2023 · 3 comments

Comments

@siebrenf
Copy link

Hey all,

the workflow at bioconda uses boa 0.14 to build packages. When building packages for OSX we're getting a KeyError in some cases. I think this might be an issue in boa, but without a mac its hard to track down where the error originates.

This PR has tracebacks and several full logs.

@dpryan79
Copy link

There's a longer thread with numerous example here: bioconda/bioconda-recipes#41526

In short, the general error we're seeing (only on OSX-64) is:

Traceback (most recent call last):
  File "/opt/mambaforge/envs/bioconda/bin/conda-mambabuild", line 10, in <module>
    sys.exit(main())
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/cli/mambabuild.py", line 256, in main
    call_conda_build(action, config)
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/cli/mambabuild.py", line 228, in call_conda_build
    result = api.build(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/api.py", line 180, in build
    return build_tree(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/build.py", line 3078, in build_tree
    packages_from_this = build(metadata, stats,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/build.py", line 2038, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 787, in expand_outputs
    for (output_dict, m) in deepcopy(_m).get_output_metadata_set(permit_unsatisfiable_variants=False):
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/metadata.py", line 2524, in get_output_metadata_set
    conda_packages = finalize_outputs_pass(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/metadata.py", line 884, in finalize_outputs_pass
    fm = finalize_metadata(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 547, in finalize_metadata
    build_unsat, host_unsat = add_upstream_pins(m,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 387, in add_upstream_pins
    build_deps, build_unsat, extra_run_specs_from_build = _read_upstream_pin_files(m, 'build',
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 374, in _read_upstream_pin_files
    deps, actions, unsat = get_env_dependencies(m, env, m.config.variant,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 131, in get_env_dependencies
    actions = environ.get_install_actions(tmpdir, tuple(dependencies), env,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/cli/mambabuild.py", line 141, in mamba_get_install_actions
    solution = solver.solve_for_action(_specs, prefix)
    return to_action(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/core/solver.py", line 79, in to_action
    entry = lookup_dict[get_url_from_channel(c)]
KeyError: 'https://conda.anaconda.org/conda-forge'

It seems like the key that actually exists in the lookup_dict has "/osx-64" appended to it. No one from our end has yet delved into the details of the libmamba code to try and determine how this itself is getting set.

@wolfv
Copy link
Member

wolfv commented Jun 29, 2023

Argh, sorry, I think this is related to the latest two mamba releases ... the fix was just merged mamba-org/mamba#2641

@dpryan79
Copy link

@wolfv Excellent, is a new release imminent?

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

No branches or pull requests

3 participants