aibolit
aibolit copied to clipboard
Max diameter metric can't handle file with Unicode
Files with errors: files.tar.gz Logs errors.csv.gz
@acheshkov/z please, pay attention to this issue
You @vitaly-protasov/z need to have one of these roles in order to do "Request order start": ARC
, PO
; I'm sorry to say this, but at the moment you've got no roles in this project
Typical log looks like this:
`
,Traceback (most recent call last): | |||||
---|---|---|---|---|---|
File ""./04-find-patterns.py"", line 99, in execute_python_code_in_parallel_thread | |||||
val = metric'make'.value(file) | |||||
File ""/hdd/aibolit/aibolit/aibolit/metrics/maxDiameter/max_diam_of_tree.py"", line 63, in value | |||||
tree = AST(filename).value() | |||||
File ""/hdd/aibolit/aibolit/aibolit/utils/ast.py"", line 20, in value | |||||
return parse(file.read()) | |||||
File ""/usr/lib/python3.6/codecs.py"", line 321, in decode | |||||
(result, consumed) = self._buffer_decode(data, self.errors, final) | |||||
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 353: invalid start byte | |||||
` |
Hence, there is some problems in '/hdd/aibolit/aibolit/aibolit/utils/ast.py'
@0crat out