landscapeio / prospector

Inspects Python source files and provides information about type and location of classes, methods etc
GNU General Public License v2.0
1.93k stars 171 forks source link

[BUG]Cannot run tool bandit as support was not installed. #618

Closed ucakmak02 closed 1 year ago

ucakmak02 commented 1 year ago

Describe the bug Cannot run tool bandit as support was not installed.

To Reproduce

  1. Added this line to bitbucket-pipelines.yml : python -m pip install "prospector[with_bandit,with_vulture]"

  2. Pipeline running on Bitbucket returned this error: Cannot run tool bandit as support was not installed. Please install by running 'pip install prospector[with_bandit]'

  3. Then I used it by giving a fixed version(previous version) and I didn't get any errors and it worked. python -m pip install "prospector[with_bandit,with_vulture]==1.10.0"

Screenshots

Screenshot 2023-05-23 at 11 04 53

Environment (please complete the following information):

volans- commented 1 year ago

I have the same issue but I get the error about pyroma:

Cannot run tool pyroma as support was not installed.
Please install by running 'pip install prospector[with_pyroma]'

My setup.py has:

"prospector[with_everything]>=1.1.7"

The installed prospector is:

prospector==1.10.1

Version 1.10.1 is not an official release, nor mentioned in the CHANGELOG, but is present in PyPI.

If I limit the upper version to 1.10.0 it works fine. Only version 1.10.1 seems broken.

carlio commented 1 year ago

I suspect this is because I created the packages using poetry 1.5 which seems to have issues.

It is an official prospector release, it's just broken. I'll look into it soon and release a 1.10.2 version.

For now, pin to 1.10.0 - 1.10.1 was just fixing another poetry 1.5 problem where it was putting files in the wrong place when installed ... (see https://github.com/PyCQA/pylint-plugin-utils/issues/29 for more context)

carlio commented 1 year ago

Nevermind I found the problem - see a similar issue here: https://github.com/nix-community/poetry2nix/pull/702

It was already fixed - see https://github.com/PyCQA/prospector/pull/559 and https://github.com/PyCQA/prospector/pull/545

I made the 1.10.1 release from my laptop instead of using the release action so I used the newer poetry on my local machine.

Lesson learned ; I will release a new bugfix once the CI testing completes

carlio commented 1 year ago

1.10.2 is released now with the fix, with_bandit and similar will work again. Sorry about that!