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
Solution to issue cannot be found in the documentation.
I checked the documentation.
Issue
I am trying to convert to use rattler-build in conda-forge/highspy-feedstock#11 but the linter fails with an internal error. When running locally it seems to be confused by the new selector syntax:
> conda-smithy recipe-lint --conda-forge .
Traceback (most recent call last):
File "C:\Code\apps\pixi\envs\conda\Scripts\conda-smithy-script.py", line 10, in <module>
sys.exit(main())
^^^^^^
File "C:\Code\apps\pixi\envs\conda\Lib\site-packages\conda_smithy\cli.py", line 767, in main
args.subcommand_func(args)
File "C:\Code\apps\pixi\envs\conda\Lib\site-packages\conda_smithy\cli.py", line 645, in __call__
lints, hints = linter.main(
^^^^^^^^^^^^
File "C:\Code\apps\pixi\envs\conda\Lib\site-packages\conda_smithy\lint_recipe.py", line 697, in main
results, hints = lintify_meta_yaml(
^^^^^^^^^^^^^^^^^^
File "C:\Code\apps\pixi\envs\conda\Lib\site-packages\conda_smithy\lint_recipe.py", line 313, in lintify_meta_yaml
lint_single_space_in_pinned_requirements(requirements_section, lints)
File "C:\Code\apps\pixi\envs\conda\Lib\site-packages\conda_smithy\linter\lints.py", line 436, in lint_single_space_in_pinned_requirements
req, _, _ = requirement.partition("#")
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CommentedMap' object has no attribute 'partition'
Running the linter locally gives a traceback that ends in:
File "/home/rgommers/.pixi/envs/conda-smithy/lib/python3.10/site-packages/conda_smithy/lint_recipe.py", line 235, in lintify_meta_yaml
run_conda_forge_specific(
File "/home/rgommers/.pixi/envs/conda-smithy/lib/python3.10/site-packages/conda_smithy/lint_recipe.py", line 600, in run_conda_forge_specific
hint_noarch_python_use_python_min(
File "/home/rgommers/.pixi/envs/conda-smithy/lib/python3.10/site-packages/conda_smithy/linter/hints.py", line 265, in hint_noarch_python_use_python_min
req.strip().split()[0] == "python"
AttributeError: 'CommentedMap' object has no attribute 'strip'
The value of req at that point is {'if': 'linux', 'then': 'patchelf'}.
Guarding the if check with hasattr(req, 'split') and fixes the problem. I'll open a PR.
@rgommers I just looked briefly at the error message you got and the one I got and your fix, and I think you are right that they stem from the same fundamental cause: The new if: ... then: ... syntax. But I think the issue I ran into is that the recipe_version is not being propagated properly to all lints specifically lint_single_space_in_pinned_requirements.
Solution to issue cannot be found in the documentation.
Issue
I am trying to convert to use rattler-build in conda-forge/highspy-feedstock#11 but the linter fails with an internal error. When running locally it seems to be confused by the new selector syntax:
This is the requirements from the recipe
Installed packages
Environment info
The text was updated successfully, but these errors were encountered: