Trying to lint recipe results in AttributeError
See original GitHub issueI’m trying to lint my code locally and I get the following error:
Traceback (most recent call last):
File "/home/mariana/miniconda3/bin/conda-smithy", line 10, in <module>
sys.exit(main())
File "/home/mariana/miniconda3/lib/python3.8/site-packages/conda_smithy/cli.py", line 646, in main
args.subcommand_func(args)
File "/home/mariana/miniconda3/lib/python3.8/site-packages/conda_smithy/cli.py", line 479, in __call__
lints, hints = lint_recipe.main(
File "/home/mariana/miniconda3/lib/python3.8/site-packages/conda_smithy/lint_recipe.py", line 859, in main
results, hints = lintify(meta, recipe_dir, conda_forge)
File "/home/mariana/miniconda3/lib/python3.8/site-packages/conda_smithy/lint_recipe.py", line 430, in lintify
req, _, _ = requirement.partition("#")
AttributeError: 'CommentedMap' object has no attribute 'partition'
I’m running on the following folder:
(base) mariana@wintermute ~/dev/staged-recipes/recipes/xeus-octave (xeus-octave?) $ conda smithy recipe-lint .
Fresh installation out of conda-forge
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
AttributeError when running pylint with python 3.7.0 #2247
Attempting to lint my project with Python 3.7.0 results in pylint throwing an AttributeError. Linting with 3.6.5 works correctly as expected ...
Read more >How to Fix AttributeError in Python - Rollbar
This can occur when an attempt is made to reference an attribute on a value that does not support the attribute.
Read more >AttributeError: 'str' object has no attribute '_meta' when ...
I am making a recipe engine website and I am trying to create a table Ingredient where each ingredient may have substitutable ingredients....
Read more >module 'regex' has no attribute 'Match' for SQLFluff - Jan Meppe
In this blog post I'll show you how to fix the AttributeError: module 'regex' has no attribute 'Match error when trying to install...
Read more >Python: AttributeError - GeeksforGeeks
One of the error in Python mostly occurs is “AttributeError”. ... In this process suppose we want to append another value to that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Note that
conda-smithy
’s linter is not supposed to be a linter for a correct conda-build recipe, but it’s a linter to give suggestions on making a correct recipe to be better and conform to conda-forge standards. That’s why we don’t have extensive checks to make sure the recipe is correct. PRs welcome though.It’s not a huge amount of work. For this case, we need to check that
requirement
is actually a string before calling.partition
on it.