Skip to content

assemble_packages: CodebaseResource matching query does not exist #515

Description

@tdruez

Using https://files.pythonhosted.org/packages/ce/21/41a0028f6d610987c0839250357c1a00f351790b8a448c2eb323caa719ac/celery-5.2.7.tar.gz as input with the root_filesystems pipeline:

CodebaseResource matching query does not exist.

Traceback:
  File "/app/scanpipe/pipelines/__init__.py", line 115, in execute
    step(self)
  File "/app/scanpipe/pipelines/root_filesystems.py", line 118, in scan_for_application_packages
    scancode.scan_for_application_packages(self.project)
  File "/app/scanpipe/pipes/scancode.py", line 334, in scan_for_application_packages
    assemble_packages(project=project)
  File "/app/scanpipe/pipes/scancode.py", line 377, in assemble_packages
    for item in items:
  File "/usr/local/lib/python3.9/site-packages/packagedcode/pypi.py", line 224, in assemble
    root = package_resource.parent(codebase)
  File "/app/scanpipe/models.py", line 1710, in parent
    return parent_path and self.project.codebaseresources.get(path=parent_path)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 650, in get
    raise self.model.DoesNotExist(

Note that this issue does not occur with the scan_codebase nor scan_package pipelines.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions