Open pombredanne opened 1 week ago
To reproduce:
git clone https://github.com/aboutcode-org/scancode-workbench
docker run --rm -v "$(pwd)/scancode-workbench":/code ghcr.io/aboutcode-org/scancode.io:latest sh -c "run inspect_packages:StaticResolver /code" > results.json
INFO Processing item: Dependency(purl='pkg:npm/zip-stream@5.0.1', extracted_requirement='5.0.1', scope='dependencies')
INFO Processing: package.json
INFO Package data: pkg:npm/scancode-workbench@4.0.3
INFO Selected package handler: NpmPackageJsonHandler
INFO Run[370b760e-2b59-4885-9bc3-fce65957388e] Update Run instance with exitcode, output, and end_date
CommandError: Error during inspect_packages execution:
'str' object has no attribute 'path'
Traceback: File "/opt/scancodeio/aboutcode/pipeline/init.py", line 199, in execute step(self) File "/opt/scancodeio/scanpipe/pipelines/inspect_packages.py", line 61, in scan_for_application_packages scancode.scan_for_application_packages( File "/opt/scancodeio/scanpipe/pipes/scancode.py", line 409, in scan_for_application_packages assemble_packages(project=project) File "/opt/scancodeio/scanpipe/pipes/scancode.py", line 466, in assemble_packages for item in items: ^^^^^ File "/opt/scancodeio/.venv/lib/python3.12/site-packages/packagedcode/npm.py", line 120, in assemble workspace_root_path = package_resource.parent(codebase).path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To reproduce:
git clone https://github.com/aboutcode-org/scancode-workbench
docker run --rm -v "$(pwd)/scancode-workbench":/code ghcr.io/aboutcode-org/scancode.io:latest sh -c "run inspect_packages:StaticResolver /code" > results.json
INFO Processing item: Dependency(purl='pkg:npm/zip-stream@5.0.1', extracted_requirement='5.0.1', scope='dependencies')
INFO Processing: package.json
INFO Package data: pkg:npm/scancode-workbench@4.0.3
INFO Selected package handler: NpmPackageJsonHandler
INFO Run[370b760e-2b59-4885-9bc3-fce65957388e] Update Run instance with exitcode, output, and end_date
CommandError: Error during inspect_packages execution:
'str' object has no attribute 'path'
Traceback: File "/opt/scancodeio/aboutcode/pipeline/init.py", line 199, in execute step(self) File "/opt/scancodeio/scanpipe/pipelines/inspect_packages.py", line 61, in scan_for_application_packages scancode.scan_for_application_packages( File "/opt/scancodeio/scanpipe/pipes/scancode.py", line 409, in scan_for_application_packages assemble_packages(project=project) File "/opt/scancodeio/scanpipe/pipes/scancode.py", line 466, in assemble_packages for item in items: ^^^^^ File "/opt/scancodeio/.venv/lib/python3.12/site-packages/packagedcode/npm.py", line 120, in assemble workspace_root_path = package_resource.parent(codebase).path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Current toolkit is 32.2.1 per https://github.com/aboutcode-org/scancode.io/blob/53700eb015039fbe28d3e08db3b9fac28fe4ac98/setup.cfg#L75
We likely have a fix with https://github.com/aboutcode-org/scancode-toolkit/pull/3857 and we likely just need to update SCTK and release SCIO
We likely have a fix with https://github.com/aboutcode-org/scancode-toolkit/pull/3857 and we likely just need to update SCTK and release SCIO
This seems to be fixed by the above mentioned PR adding a bunch of npm improvements. Will push a release of SCTK and update sctk version in SCIO soon
@AyanSinhaMahapatra Is the problem still exist after the merge of https://github.com/aboutcode-org/scancode.io/pull/1418 ?
@tdruez this is fixed with the latest ghcr.io/aboutcode-org/scancode.io:v34.8.3
image.
I received a report of someone having issues with the docker image of scancode.io.
Here is the error:
For this tutorial: https://scancodeio.readthedocs.io/en/latest tutorial_cli_end_to_end_scanning_to_dejacode.html
I installed scancode.io following this document: https://scancodeio.readthedocs.io/en/latest/installation.html#installation
And I had this error: