aibolit icon indicating copy to clipboard operation
aibolit copied to clipboard

Max diameter metric can't handle file with Unicode

Open lyriccoder opened this issue 4 years ago • 5 comments

Files with errors: files.tar.gz Logs errors.csv.gz

lyriccoder avatar May 12 '20 11:05 lyriccoder

@acheshkov/z please, pay attention to this issue

0crat avatar May 12 '20 11:05 0crat

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

0crat avatar May 13 '20 15:05 0crat

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'

Vitaly-Protasov avatar May 13 '20 15:05 Vitaly-Protasov

@0crat out

acheshkov avatar May 16 '20 07:05 acheshkov

@0crat out (here)

@acheshkov Job gh:yegor256/aibolit#280 is not assigned, can't get performer

0crat avatar May 16 '20 07:05 0crat