You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and next line value = fp.read().rstrip(), this builtin lib can not read non-unicode string
I think, this expected encoding is 'utf-8' or 'unicode', but is setting for default system language encoder.
So, I modified this line(no.93 and 148 at symbolic.py) for that
#with open(cls._get_packed_refs_path(repo), 'rt') as fp:#modify: encoding option setting for multilanguagewithopen(cls._get_packed_refs_path(repo), 'rt', encoding='utf-8') asfp:
after this modify, it has no problem! but, I worried about some side-effect.
few source code used yet open() function, I can not certain for every coverage from os, encoding system and etc.
please check this problem.
The text was updated successfully, but these errors were encountered:
I've encountered a variation on this error when the non-ascii ref is in refs/heads instead of packed-refs.
File '/var/local/env-allura/lib/python2.7/site-packages/git/repo/base.py', line 269 in heads
return Head.list_items(self)
File '/var/local/env-allura/lib/python2.7/site-packages/git/util.py', line 934 in list_items
out_list.extend(cls.iter_items(repo, *args, **kwargs))
File '/var/local/env-allura/lib/python2.7/site-packages/git/refs/symbolic.py', line 601 in _iter_items
for root, dirs, files in os.walk(join_path_native(repo.common_dir, common_path)):
File '/usr/lib64/python2.7/os.py', line 284 in walk
if isdir(join(top, name)):
File '/usr/lib64/python2.7/posixpath.py', line 80 in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 15: ordinal not in range(128)
In my packed-refs file, following contents:
problem encounter from
df5227b1e584215e9f69a577b7b284230b5a5e1d refs/tags/테스트
,and error message here:
(This is not common case of naming for branch or tags name as non-english. but, I need handing for this problem.)
problem point is line no.94 at
_iter_packed_refs
insymbolic.py
.when open as
fp
, properties hasand next line
value = fp.read().rstrip()
, this builtin lib can not read non-unicode stringI think, this expected encoding is
'utf-8'
or'unicode'
, but is setting for default system language encoder.So, I modified this line(no.93 and 148 at symbolic.py) for that
after this modify, it has no problem! but, I worried about some side-effect.
few source code used yet
open()
function, I can not certain for every coverage from os, encoding system and etc.please check this problem.
The text was updated successfully, but these errors were encountered: