question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to lint recipe results in AttributeError

See original GitHub issue

I’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:open
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
isurufcommented, Jun 14, 2021

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.

0reactions
isurufcommented, Jun 14, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found