coderev icon indicating copy to clipboard operation
coderev copied to clipboard

TypeError: expected a character buffer object

Open Guru24 opened this issue 9 years ago • 0 comments

I'm trying to generate the diffs

Directory structure OLD/sprint.c NEW/sprint.c

$ ./codediff.py OLD NEW -o OUTPUT total 1 files to check Traceback (most recent call last): File "coderev-master/codediff.py", line 831, in ? differ.make_diff() File "coderev-master/codediff.py", line 723, in make_diff self.__diff_dir() File "coderev-master/codediff.py", line 712, in __diff_dir self.__diff_dir_by_list() File "coderev-master/codediff.py", line 597, in __diff_dir_by_list if not stat.S_ISREG(stat1[0]) or is_binary_file(obj1): File "coderev-master/codediff.py", line 136, in is_binary_file return is_binary_string(open(file).read(2014)) File "coderev-master/codediff.py", line 47, in is_binary_string = lambda bytes: bool(bytes.translate(None, textchars)) TypeError: expected a character buffer object

How to overcome this issue? Is it an environment problem?

$ uname -a Linux BL4UL188 2.6.32-573.26.1.el6.x86_64 #1 SMP Tue Apr 12 01:47:01 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

Guru24 avatar Nov 28 '16 07:11 Guru24