Skip to content

TypeError: cannot unpack non-iterable NoneType object (again) #77

Description

@nnobelis

This issue looks like a previous one (#72) but I get it on another file and the suggested fix does not work.
Therefore, I open a new issue.

While running python-inspector --python-version 310 --json-pdt - --analyze-setup-py-insecurely --requirement requirements.txt
on a file containing only:

non-existing-module==0.1

I get the following exception:

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/[email protected]/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/linuxbrew/.linuxbrew/opt/[email protected]/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/[email protected]/lib/python3.10/site-packages/python_inspector/resolve_cli.py", line 389, in resolve_dependencies
    resolved_dependencies, purls = resolve(
  File "/home/linuxbrew/.linuxbrew/opt/[email protected]/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

Could the output of the tool be improved with module 'non-existing-module' not found for instance ?

Tested with python-inspector 0.7.1 and 0.8.1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions