aboutcode-org / aboutcode-org/scancode-toolkit

'extractcode –shallow' returns cryptic error message

Đang mở
#1,376 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
archive extraction bug Priority: low
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ả

Yesterday I ran extractcode (on Ubuntu 16.04, I believe) with a command I composed in LibreOffice, not realizing that the autocorrect feature had converted the double dash `--shallow` into a single emdash or endash (not sure which) `-shallow`. ScanCode returned the following rather cryptic error message:

```
$extractcode –shallow some.zip
Usage: extractcode [OPTIONS]
Try 'extractcode --help' for help on options and arguments.

Traceback (most recent call last):
File "/tmp/scancode-toolkit-develop/bin/extractcode", line 11, in
load_entry_point('scancode-toolkit', 'console_scripts', 'extractcode')()
File "/tmp/scancode-toolkit-develop/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/tmp/scancode-toolkit-develop/src/scancode/utils.py", line 79, in main
standalone_mode=standalone_mode, **extra)
File "/tmp/scancode-toolkit-develop/local/lib/python2.7/site-packages/click/core.py", line 707, in main
e.show()
File "/tmp/scancode-toolkit-develop/local/lib/python2.7/site-packages/click/exceptions.py", line 48, in show
echo('Error: %s' % self.format_message(), file=file, color=color)
File "/tmp/scancode-toolkit-develop/local/lib/python2.7/site-packages/click/exceptions.py", line 84, in format_message
return 'Invalid value for %s: %s' % (param_hint, self.message)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 6: ordinal not in range(128)
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.