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

Fix AttributeError in conda_build_spec in case there is no pin #268

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

Tobias-Fischer
Copy link
Contributor

A simple recipe like https://github.com/RoboStack/ros-galactic/tree/main/additional_recipes/ros2-distro-mutex fails with:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│                                                                                                  │
│ /Users/fischert/mambaforge/lib/python3.9/site-packages/boa/core/run_build.py:302 in build_recipe │
│                                                                                                  │
│   299 │   │   │   o.finalize_solve(sorted_outputs)                                               │
│   300 │   │   │                                                                                  │
│   301 │   │   │   meta = MetaData(recipe_path, o)                                                │
│ ❱ 302 │   │   │   o.set_final_build_id(meta)                                                     │
│   303 │   │   │                                                                                  │
│   304 │   │   │   if o.skip() or full_render:                                                    │
│   305 │   │   │   │   continue                                                                   │
│ /Users/fischert/mambaforge/lib/python3.9/site-packages/boa/core/recipe_output.py:576 in          │
│ set_final_build_id                                                                               │
│                                                                                                  │
│   573 │   │   │   │   │   # remove self-run-exports for static packages                          │
│   574 │   │   │   │   │   run_exports_list[:] = []                                               │
│   575 │   │   │   │   else:                                                                      │
│ ❱ 576 │   │   │   │   │   x.eval_pin_subpackage([self])                                          │
│   577 │   │   │   │                                                                              │
│   578 │   │   │   │   x.eval_pin_subpackage([self])                                              │
│   579 │   │   │   run_exports_list[:] = [x.final for x in run_exports_list]                      │
│                                                                                                  │
│ /Users/fischert/mambaforge/lib/python3.9/site-packages/boa/core/conda_build_spec.py:157 in       │
│ eval_pin_subpackage                                                                              │
│                                                                                                  │
│   154 │   │   version = output.version                                                           │
│   155 │   │   build_string = output.final_build_id                                               │
│   156 │   │                                                                                      │
│ ❱ 157 │   │   if self.pin.exact:                                                                 │
│   158 │   │   │   self.final = f"{pkg_name} {version} {build_string}"                            │
│   159 │   │   else:                                                                              │
│   160 │   │   │   version_parts = version.split(".")                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'NoneType' object has no attribute 'exact'

@wolfv wolfv merged commit 3213180 into mamba-org:main Mar 23, 2022
@wolfv
Copy link
Member

wolfv commented Mar 23, 2022

Thanks & sorry!

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

Successfully merging this pull request may close these issues.

2 participants