aboutcode-org / aboutcode-org/scancode-toolkit

Consolidation plugin crashes

Open
#1,891 3 comments 0 reactions 1 assignee Claimed by @JonoYang View on GitHub
bug plugin
Dominant language
Python
Stars
2.6k
Forks
791
Avg merge
1d 12h
Merged PRs (30d)
5

Description

I was scanning a codebase using the consolidation plugin and the following error occured:

```
ERROR: failed to run post-scan plugin: consolidate:
Traceback (most recent call last):
File "/home/jyang/tools/scancode-toolkit/src/scancode/cli.py", line 1044, in run_codebase_plugins
plugin.process_codebase(codebase, **kwargs)
File "/home/jyang/tools/scancode-toolkit/src/summarycode/plugin_consolidate.py", line 183, in process_codebase
consolidations.extend(get_holders_consolidated_components(codebase))
File "/home/jyang/tools/scancode-toolkit/src/summarycode/plugin_consolidate.py", line 400, in get_holders_consolidated_components
for c in create_consolidated_components(ancestor, codebase, holder_key):
File "/home/jyang/tools/scancode-toolkit/src/summarycode/plugin_consolidate.py", line 414, in create_consolidated_components
if not (normalized_holder.key == holder_key):
AttributeError: 'collections.OrderedDict' object has no attribute 'key'
```

We will have to get the `key` value properly from `normalized_holder`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.