Unicode bug

Lars Skjærlund las at dbc.dk
Mon Feb 20 14:14:49 UTC 2017


Hi,

I'm afraid I've hit a bug: Someone in our organization has created a Git branch with a name including the Danish character 'å' - and that makes Kallithea crash:



Module ?:2 in index
Module kallithea.lib.auth:810 in __wrapper
>>  return func(*fargs, **fkwargs)
Module ?:2 in index
Module kallithea.lib.auth:857 in __wrapper
>>  return func(*fargs, **fkwargs)
Module kallithea.controllers.summary:115 in index
>>  _load_changelog_summary()
Module kallithea.controllers.changelog:62 in _load_changelog_summary
>>  url=url_generator)
Module kallithea.lib.helpers:1086 in __init__
>>  self.items = list(self.collection[self.first_item:self.last_item + 1])
Module kallithea.lib.vcs.backends.base:186 in __getslice__
>>  yield self.get_changeset(rev)
Module kallithea.lib.vcs.backends.git.repository:502 in get_changeset
>>  revision = self._get_revision(revision)
Module kallithea.lib.vcs.backends.git.repository:295 in _get_revision
>>  _ref_revision = self._parsed_refs.get(revision)
Module kallithea.lib.vcs.utils.lazy:43 in __get__
>>  value = self._func(obj)
Module kallithea.lib.vcs.backends.git.repository:460 in _parsed_refs
>>  return self._get_parsed_refs()
Module kallithea.lib.vcs.backends.git.repository:465 in _get_parsed_refs
>>  refs = _repo.get_refs()
Module dulwich.repo:302 in get_refs
>>  return self.refs.as_dict()
Module dulwich.refs:146 in as_dict
>>  keys = self.keys(base)
Module dulwich.refs:125 in keys
>>  return self.allkeys()
Module dulwich.refs:412 in allkeys
>>  for root, dirs, files in os.walk(self.refpath("refs")):
Module os:296 in walk
>>  for x in walk(new_path, topdown, onerror, followlinks):
Module os:296 in walk
>>  for x in walk(new_path, topdown, onerror, followlinks):
Module os:286 in walk
>>  if isdir(join(top, name)):
Module posixpath:80 in join
>>  path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12: ordinal not in range(128)



It's rather unfortunate as the entire repository is inaccessible due to this error. I've just upgraded to 3.2 and installed the 'chardet' module - but to no avail.

Any hints on what can be done?

Thanks in advance,
Lars


Med venlig hilsen
Lars Skjærlund
DevOps
Tlf.: 44 86 77 77
DBC as

www.dbc.dk
las at dbc.dk


More information about the kallithea-general mailing list