git-cc icon indicating copy to clipboard operation
git-cc copied to clipboard

UnicodeDecodeError: 'utf8' codec can't decode byte 0xb8 in position 7713658: invalid start byte

Open hitenc opened this issue 12 years ago • 7 comments

Error encountered while rebase

[root@linux git-repo]# /root/git-cc-master/gitcc rebase

git ls-files --modified git log -n 1 --pretty=format:%ai master_cc cleartool ls -recurse -short . cleartool lsh -fmt %o%m|%Nd|%u|%En|%Vn|%Nc\n -recurse . Traceback (most recent call last): File "/root/git-cc-master/gitcc", line 48, in main() File "/root/git-cc-master/gitcc", line 14, in main return invoke(cmd, args) File "/root/git-cc-master/gitcc", line 38, in invoke cmd.main(_args) File "/root/git-cc-master/rebase.py", line 40, in main history = getHistory(since) File "/root/git-cc-master/rebase.py", line 87, in getHistory return cc_exec(lsh) File "/root/git-cc-master/common.py", line 50, in cc_exec return popen('cleartool', cmd, CC_DIR, *_args) File "/root/git-cc-master/common.py", line 61, in popen return stdout if not decode else stdout.decode(ENCODING) File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xb8 in position 7713658: invalid start byte [root@linux git-repo]#

hitenc avatar Sep 30 '13 09:09 hitenc

Hi Hitendra,

God I made such a hash of the encoding/decoding in git-cc. I'm afraid my python just isn't good enough to fix this bug. You might want to look at changing the ENCODING value in common.py. There is a commit message that doesn't contain a utf-8 character. :(

Sorry I can't help you - but I haven't use this program in 3-4 years now. Let me know if you have any luck fixing it.

Cheers, Charles

charleso avatar Sep 30 '13 11:09 charleso

@hitenc were you able to resolve this? I've run into a similar issue because some files have special characters in their name.

toroc avatar Oct 23 '17 17:10 toroc

@charleso I got same error while using git rebase. Can you please give some hints to fix this issue?

`: 'utf8' codec can't decode byte 0xa0 in position 148800: invalid start byte

git branch cleartool get -to /view/Win-DOS2UNIX/DOS2UNIX.EXE Win-DOS2UNIX/DOS2UNIX.EXE@@/main/1 git branch -f master_cc Traceback (most recent call last): File "/bin/gitcc", line 9, in load_entry_point('git-cc==1.0.1.dev0', 'console_scripts', 'gitcc')() File "build/bdist.linux-x86_64/egg/git_cc/gitcc.py", line 25, in main File "build/bdist.linux-x86_64/egg/git_cc/gitcc.py", line 50, in invoke File "build/bdist.linux-x86_64/egg/git_cc/rebase.py", line 54, in main File "build/bdist.linux-x86_64/egg/git_cc/common.py", line 68, in doStash File "build/bdist.linux-x86_64/egg/git_cc/rebase.py", line 54, in File "build/bdist.linux-x86_64/egg/git_cc/rebase.py", line 71, in doCommit File "build/bdist.linux-x86_64/egg/git_cc/common.py", line 77, in git_exec File "build/bdist.linux-x86_64/egg/git_cc/common.py", line 92, in popen Exception: fatal: Not a valid object name: 'master'. `

faisal-hameed avatar Nov 21 '17 15:11 faisal-hameed

@faisal-hameed I'm sorry I really can't. It's obviously an encoding issue, which has plagued git-cc because I didn't know what I was doing in python (or clearcase for that matter). :(

charleso avatar Nov 21 '17 20:11 charleso

Thanks @charleso . I fixed my issue in : #81

faisal-hameed avatar Feb 06 '18 19:02 faisal-hameed

Same problem here:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 3477435: invalid start byte

Any progress on merging the related PR?

yourfate avatar Feb 12 '20 13:02 yourfate

@yourfate Just curious, does the PR fix your issue locally?

charleso avatar Feb 12 '20 21:02 charleso