aboutcode-org / aboutcode-org/scancode-toolkit
Strange error statement: Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.\n
- 主要语言
- Python
- 星标
- 2.6k
- 派生
- 791
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 5
描述
### Description
I ran a scan on what looks like a minimized Debian filesystem (I got it from a Docker container):
`scancode -lpcu --quiet --json - /path/to/filesystem`
Before it spits out the giant json object it gives this message:
`Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.\n`
When running without `--quiet` I get this message:
```
Scanning done.
Some files failed to scan properly:
Path: contents/usr/share/doc/gpgv/copyright
Path: contents/usr/share/doc/libgcrypt20/copyright
```
I don't see any issue with these two files.
When running the scan on just these two files I don't get the above "some characters could not be decoded" but it does give a scan error:
```
"ERROR: for scanner: licenses:\nERROR: Unknown error:\nTraceback (most recent call last):\n File \"/home/nisha/scancodeenv/lib/python3.6/site-packages/scancode/interrupt.py\", line 92, in interruptible\n return NO_ERROR, func(*(args or ()), **(kwargs or {}))\n File \"/home/nisha/scancodeenv/lib/python3.6/site-packages/scancode/api.py\", line 211, in get_licenses\n _licenses_data_from_match(match, matched_text, license_url_template)\n File \"/home/nisha/scancodeenv/lib/python3.6/site-packages/scancode/api.py\", line 234, in _licenses_data_from_match\n result['key'] = lic.key\nAttributeError: 'NoneType' object has no attribute 'key'\n"]}
```
### System configuration
System: Ubuntu 18.04
Scancode version: 3.1.1
Downloaded using pip install [scancode-toolkit](url)
Python version: 3.7
贡献指南
评估
这个 Issue 还没有评估数据。