Skip to content

Python inspector cannot resolve azure-devops dependency #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nnobelis opened this issue Oct 6, 2022 · 3 comments
Closed

Python inspector cannot resolve azure-devops dependency #78

nnobelis opened this issue Oct 6, 2022 · 3 comments

Comments

@nnobelis
Copy link

nnobelis commented Oct 6, 2022

I have the following requirement.txt file:

azure-devops
azure-storage-blob
click

If I run:
python-inspector --python-version 310 --json-pdt - --requirement requirements.txt --verbose

it crashes:

Resolving dependencies...
Using netrc file /home/XXX/.netrc
direct_dependencies:
 DependentPackage(purl='pkg:pypi/azure-devops', extracted_requirement='azure-devops', scope='install')
 DependentPackage(purl='pkg:pypi/azure-storage-blob', extracted_requirement='azure-storage-blob', scope='install')
 DependentPackage(purl='pkg:pypi/click', extracted_requirement='click', scope='install')
environment: Environment(python_version='310', operating_system='linux')
repos:
 PypiSimpleRepository(index_url='https://pypi.org/simple', credentials=None)
ResolutionImpossible([RequirementInformation(requirement=<Requirement('azure-devops')>, parent=None)])
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/python-inspector", line 8, in <module>
    sys.exit(resolve_dependencies())
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/site-packages/python_inspector/resolve_cli.py", line 389, in resolve_dependencies
    resolved_dependencies, purls = resolve(
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/site-packages/python_inspector/resolve_cli.py", line 472, in resolve
    resolved_dependencies, packages = get_resolved_dependencies(
TypeError: cannot unpack non-iterable NoneType object

If I replace the first line with
azure-devops==6.0.0b4

it is successful.

Why a version is required for azure-devops and not the other ones ?

Also for information, here was the result found with pipdeptree :

image

Why pipdeptree found the version b2 when the version b4 was available ?

@pombredanne
Copy link
Member

That's a bug alright! Thanks for the report.

@TG1999
Copy link
Contributor

TG1999 commented Oct 10, 2022

@nnobelis please check https://pypi.org/project/python-inspector/0.8.2/ and let us know if the issue persists

@nnobelis
Copy link
Author

Thanks. I can confirm the bug is now fixed !

nnobelis added a commit to boschglobal/oss-review-toolkit that referenced this issue Oct 11, 2022
For the release notes see [1].

This update fixes the case where 'azure-devops' was in the requirements
file without version and was crashing the python inspector.

[1]: https://github.com/nexB/python-inspector/blob/18d20a18b944f0b472c9bb300802b5ff2249859c/CHANGELOG.rst
[2]: aboutcode-org/python-inspector#78

Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.io>
nnobelis added a commit to boschglobal/oss-review-toolkit that referenced this issue Oct 11, 2022
For the release notes see [1].

This update fixes the case where 'azure-devops' was in the requirements
file without version and was crashing the python inspector.

[1]: https://github.com/nexB/python-inspector/blob/18d20a18b944f0b472c9bb300802b5ff2249859c/CHANGELOG.rst
[2]: aboutcode-org/python-inspector#78

Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.io>
nnobelis added a commit to boschglobal/oss-review-toolkit that referenced this issue Oct 11, 2022
For the release notes see [1].

This update fixes the case where 'azure-devops' was in the requirements
file without version and was crashing the python inspector ([2]).

[1]: https://github.com/nexB/python-inspector/blob/18d20a18b944f0b472c9bb300802b5ff2249859c/CHANGELOG.rst
[2]: aboutcode-org/python-inspector#78

Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.io>
mnonnenmacher added a commit to boschglobal/oss-review-toolkit that referenced this issue Oct 11, 2022
For the release notes see [1].

This update fixes an issue if 'azure-devops' was in the requirements
file without defining a version which was crashing python-inspector [2].

Set the minimum required version to 0.8.1 because this version
introduced a renaming in the python-inspector output.

[1]: https://github.com/nexB/python-inspector/blob/main/CHANGELOG.rst#v082
[2]: aboutcode-org/python-inspector#78

Co-authored-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.io>
mnonnenmacher added a commit to boschglobal/oss-review-toolkit that referenced this issue Oct 11, 2022
For the release notes see [1].

This update fixes an issue if 'azure-devops' was in the requirements
file without defining a version which was crashing python-inspector [2].

Set the minimum required version to 0.8.1 because this version
introduced a renaming in the python-inspector output.

[1]: https://github.com/nexB/python-inspector/blob/main/CHANGELOG.rst#v082
[2]: aboutcode-org/python-inspector#78

Co-authored-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.io>
mnonnenmacher added a commit to oss-review-toolkit/ort that referenced this issue Oct 11, 2022
For the release notes see [1].

This update fixes an issue if 'azure-devops' was in the requirements
file without defining a version which was crashing python-inspector [2].

Set the minimum required version to 0.8.1 because this version
introduced a renaming in the python-inspector output.

[1]: https://github.com/nexB/python-inspector/blob/main/CHANGELOG.rst#v082
[2]: aboutcode-org/python-inspector#78

Co-authored-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.io>
TG1999 pushed a commit that referenced this issue Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants