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

Marge crashing with an UnicodeEncodeError #56

Closed
aschmolck opened this issue Oct 10, 2017 · 0 comments · Fixed by #57
Closed

Marge crashing with an UnicodeEncodeError #56

aschmolck opened this issue Oct 10, 2017 · 0 comments · Fixed by #57
Assignees
Labels

Comments

@aschmolck
Copy link
Contributor

  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/job.py", line 55, in execute
    self.rebase_and_accept(approvals)
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/job.py", line 111, in rebase_and_accept
    tested_by=tested_by,
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/job.py", line 298, in push_rebased_and_rewritten_version
    start_commit='origin/' + target_branch,
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/git.py", line 52, in tag_with_trailer
    self.git('filter-branch', '--force', '--msg-filter', filter_script, commit_range)
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/git.py", line 138, in git
    return _run(*command, env=env, check=True, timeout=TIMEOUT_IN_SECS)
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/git.py", line 147, in _run
    with subprocess.Popen(args, env=env, stdout=PIPE, stderr=PIPE) as process:
  File "/nix/store/an47r56zf6xn6fp2kyfygdy8xbplzyc2-python3-3.6.1/lib/python3.6/subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "/nix/store/an47r56zf6xn6fp2kyfygdy8xbplzyc2-python3-3.6.1/lib/python3.6/subprocess.py", line 1260, in _execute_child
    restore_signals, start_new_session, preexec_fn)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe3' in position 25: ordinal not in range(128)
Traceback (most recent call last):
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/bin/.marge.app-wrapped", line 4, in <module>
    marge.app.main()
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/app.py", line 151, in main
    marge_bot.start()
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/bot.py", line 36, in start
    self._run(repo_manager)
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/bot.py", line 90, in _run
    merge_job.execute()
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/job.py", line 55, in execute
    self.rebase_and_accept(approvals)
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/job.py", line 111, in rebase_and_accept
    tested_by=tested_by,
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/job.py", line 298, in push_rebased_and_rewritten_version
    start_commit='origin/' + target_branch,
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/git.py", line 52, in tag_with_trailer
    self.git('filter-branch', '--force', '--msg-filter', filter_script, commit_range)
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/git.py", line 138, in git
    return _run(*command, env=env, check=True, timeout=TIMEOUT_IN_SECS)
  File "/nix/store/q0m1zzzkxhliiyjhvhidisx9ja196v64-python3.6-marge-0.3.2/lib/python3.6/site-packages/marge/git.py", line 147, in _run
    with subprocess.Popen(args, env=env, stdout=PIPE, stderr=PIPE) as process:
  File "/nix/store/an47r56zf6xn6fp2kyfygdy8xbplzyc2-python3-3.6.1/lib/python3.6/subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "/nix/store/an47r56zf6xn6fp2kyfygdy8xbplzyc2-python3-3.6.1/lib/python3.6/subprocess.py", line 1260, in _execute_child
    restore_signals, start_new_session, preexec_fn)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe3' in position 25: ordinal not in range(128)

There are two bugs here:

  • we should always force utf-8 encoding and decoding, locale be damned (the problem here almost certainly is that the LANG/LC_ALL are not .utf-8)
  • marge-bot should unassign hereself on failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant