You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched open reports and couldn't find a duplicate
What happened?
Ran into an issue trying to render a package (recipe) with conda-smithy; Filed conda-forge/conda-smithy#2306, but seems to be coming from conda-build. Trace:
Traceback (most recent call last):
File "/Users/nickd/.local/bin/conda-smithy", line 10, in <module>
sys.exit(main())
^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/cli.py", line 767, in main
args.subcommand_func(args)
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/cli.py", line 608, in __call__
self._call(args, tmpdir)
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/cli.py", line 613, in _call
configure_feedstock.main(
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/configure_feedstock.py", line 2920, in main
render_azure(env, config, forge_dir, return_metadata=True)
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/configure_feedstock.py", line 1935, in render_azure
return _render_ci_provider(
^^^^^^^^^^^^^^^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/configure_feedstock.py", line 1237, in _render_ci_provider
dump_subspace_config_files(
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/configure_feedstock.py", line 783, in dump_subspace_config_files
configs, top_level_loop_vars = _collapse_subpackage_variants(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_smithy/configure_feedstock.py", line 577, in _collapse_subpackage_variants
meta.get_used_loop_vars(force_top_level=True) for meta in list_of_metas
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_build/metadata.py", line 2807, in get_used_loop_vars
used_vars = self.get_used_vars(
^^^^^^^^^^^^^^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_build/metadata.py", line 2905, in get_used_vars
meta_yaml_reqs = self._get_used_vars_meta_yaml(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_build/metadata.py", line 2980, in _get_used_vars_meta_yaml
reqs_text, recipe_text = self._get_used_vars_meta_yaml_helper(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_build/metadata.py", line 2963, in _get_used_vars_meta_yaml_helper
) + self.extract_single_output_text(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nickd/.condax/conda-smithy/lib/python3.12/site-packages/conda_build/metadata.py", line 2321, in extract_single_output_text
output = output_matches[output_index] if output_matches else ""
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
IndexError: list index out of range
The problem seems to come from the situation warned about in
only has three matches because recipe_text only includes the outputs: section, not the implicit metapackage from the top-level requirement (as documented here). So when the block below tries to output_matches[output_index] it fails because output_index == len(output_matches) (e.g. higher index).
This warning was added in 74dc428, and possibly #5655 is a symptom; if it's only counting output: sections now, then the lengths won't match but perhaps it can still find the zeroth package?
An extra note that although 74dc428 warns explicitly against using jinja in the output list, the same problem happened even when I completely stripped out the jinja parts of the output names.
Checklist
What happened?
Ran into an issue trying to render a package (recipe) with conda-smithy; Filed conda-forge/conda-smithy#2306, but seems to be coming from conda-build. Trace:
The problem seems to come from the situation warned about in
conda-build/conda_build/metadata.py
Lines 2294 to 2301 in 0eb74e1
The
output_matches
as parsed fromrecipe_text
:conda-build/conda_build/metadata.py
Lines 2286 to 2287 in 0eb74e1
recipe_text
only includes theoutputs:
section, not the implicit metapackage from the top-level requirement (as documented here). So when the block below tries tooutput_matches[output_index]
it fails becauseoutput_index == len(output_matches)
(e.g. higher index).This warning was added in 74dc428, and possibly #5655 is a symptom; if it's only counting
output:
sections now, then the lengths won't match but perhaps it can still find the zeroth package?Moving to an explicit metapackage made the problem go away: conda-forge/hdf5-external-filter-plugins-feedstock@c0c9243
Conda Info
Conda Config
Conda list
Additional Context
No response
The text was updated successfully, but these errors were encountered: