Skip to content

Error when showing a SW360 project with no components #197

@tngraf

Description

@tngraf
poetry run capycli project prerequisites -url https://stage.sw360.siemens.com -id 36f0b95719f246b7ba124b0a0427e06e -t xxx
CaPyCli, 2.10.0 - Checks whether all prerequisites for a successful software clearing are fulfilled

  Project name: Empty, 0
  Clearing state: OPEN
  No project owner specified!
  No project responsible specified!
  No security responsibles specified!
  Tag: SI B SW

    No linked projects
    No linked releases

Summary:
Traceback (most recent call last):
  File "C:\Users\kh1gt683\AppData\Local\pypoetry\Cache\virtualenvs\capycli-k8KaVlrr-py3.13\Scripts\\capycli", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "D:\Software\SWC\Python\capycli\capycli\main\cli.py", line 28, in main
    app.run(argv)
    ~~~~~~~^^^^^^
  File "D:\Software\SWC\Python\capycli\capycli\main\application.py", line 159, in run
    self._run(argv)
    ~~~~~~~~~^^^^^^
  File "D:\Software\SWC\Python\capycli\capycli\main\application.py", line 146, in _run
    handle_project.run_project_command(self.options)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "D:\Software\SWC\Python\capycli\capycli\project\handle_project.py", line 67, in run_project_command
    app3.run(args)
    ~~~~~~~~^^^^^^
  File "D:\Software\SWC\Python\capycli\capycli\project\check_prerequisites.py", line 337, in run
    self.check_project_prerequisites(args.id, sbom)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "D:\Software\SWC\Python\capycli\capycli\project\check_prerequisites.py", line 270, in check_project_prerequisites
    print_text("  Total components: " + str(len(releases)))
                                                ^^^^^^^^
UnboundLocalError: cannot access local variable 'releases' where it is not associated with a value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions