aboutcode-org / aboutcode-org/scancode-toolkit
Strange error statement: Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.\n
- Ngôn ngữ chính
- Python
- Star
- 2.6k
- Fork
- 791
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 5
Mô tả
### 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
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.