Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hitenc opened this issue Sep 30, 2013 · 7 comments

Comments

@hitenc
Copy link

hitenc commented Sep 30, 2013

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]#

@charleso
Copy link
Owner

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

@toroc
Copy link

toroc commented Oct 23, 2017

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

@faisal-hameed
Copy link

@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'.
`

@charleso
Copy link
Owner

@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). :(

faisal-hameed added a commit to faisal-hameed/git-cc that referenced this issue Feb 6, 2018
@faisal-hameed
Copy link

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

@yourfate
Copy link

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?

@charleso
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants