Skip to content

Exception with accentuated characters in user.name #77

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

Open
guillemglez opened this issue Apr 9, 2019 · 0 comments
Open

Exception with accentuated characters in user.name #77

guillemglez opened this issue Apr 9, 2019 · 0 comments

Comments

@guillemglez
Copy link

When set user.name includes accents, repo init throws an exception:

Traceback (most recent call last):
  File ".repo/repo/main.py", line 547, in <module>
    _Main(sys.argv[1:])
  File ".repo/repo/main.py", line 522, in _Main
    result = repo._Run(argv) or 0
  File ".repo/repo/main.py", line 184, in _Run
    result = cmd.Execute(copts, cargs)
  File ".repo/repo/subcmds/init.py", line 424, in Execute
    self._SyncManifest(opt)
  File ".repo/repo/subcmds/init.py", line 173, in _SyncManifest
    print('Get %s' % GitConfig.ForUser().UrlInsteadOf(opt.manifest_url),
  File ".repo/repo/git_config.py", line 230, in UrlInsteadOf
    for new_url in self.GetSubSections('url'):
  File ".repo/repo/git_config.py", line 217, in GetSubSections
    return self._sections.get(section, set())
  File ".repo/repo/git_config.py", line 241, in _sections
    for name in self._cache.keys():
  File ".repo/repo/git_config.py", line 258, in _cache
    self._cache_dict = self._Read()
  File ".repo/repo/git_config.py", line 264, in _Read
    d = self._ReadGit()
  File ".repo/repo/git_config.py", line 310, in _ReadGit
    d = d.decode('utf-8')
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 22: invalid continuation byte

To solve it, user.name has to be changed with A-z characters:
git config --global user.name "Your Name"

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

1 participant