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 · 5 comments

Comments

Projects
None yet
4 participants
@hitenc

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

This comment has been minimized.

Show comment
Hide comment
@charleso

charleso Sep 30, 2013

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

Owner

charleso commented Sep 30, 2013

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

This comment has been minimized.

Show comment
Hide comment
@toroc

toroc 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.

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

This comment has been minimized.

Show comment
Hide comment
@faisal-hameed

faisal-hameed Nov 21, 2017

@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 commented Nov 21, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@charleso

charleso Nov 21, 2017

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

Owner

charleso commented Nov 21, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@faisal-hameed

faisal-hameed Feb 6, 2018

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

faisal-hameed commented Feb 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment