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

GitPoller fails encoding ascii on a branch name #3769

Closed
pho opened this Issue Nov 21, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@pho

pho commented Nov 21, 2017

Hi, we're getting an error encoding a branch with an ñ on its name:

2017-11-21 08:08:55+0000 [-] while polling for changes
        Traceback (most recent call last):
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 459, in callback
            self._startRunCallbacks(result)
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
            self._runCallbacks()
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1442, in gotResult
            _inlineCallbacks(r, g, deferred)
        --- <exception caught here> ---
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
            result = g.send(result)
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/buildbot/changes/gitpoller.py", line 189, in poll
            path=self.workdir)
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/buildbot/changes/gitpoller.py", line 350, in _dovccmd
            encodeArg([command] + args),
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/buildbot/changes/gitpoller.py", line 344, in encodeArg
            return [encodeArg(a) for a in arg]
          File "/home/buildbot/buildbot-adv/env/local/lib/python2.7/site-packages/buildbot/changes/gitpoller.py", line 347, in encodeArg
            return arg.encode("ascii")
        exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 18: ordinal not in range(128)

https://github.com/buildbot/buildbot/blob/master/master/buildbot/changes/gitpoller.py#L346

@rodrigc

This comment has been minimized.

Show comment
Hide comment
@rodrigc

rodrigc Nov 21, 2017

Collaborator

@pho can you try this patch: #3770 ?

Collaborator

rodrigc commented Nov 21, 2017

@pho can you try this patch: #3770 ?

@pho

This comment has been minimized.

Show comment
Hide comment
@pho

pho Nov 21, 2017

Awesome! Seems to be working nicely

Thank you!

pho commented Nov 21, 2017

Awesome! Seems to be working nicely

Thank you!

@rodrigc

This comment has been minimized.

Show comment
Hide comment
@rodrigc

rodrigc Nov 21, 2017

Collaborator

@pho thanks for the quick feedback.

Collaborator

rodrigc commented Nov 21, 2017

@pho thanks for the quick feedback.

@pho

This comment has been minimized.

Show comment
Hide comment
@pho

pho Nov 21, 2017

Should we close this now? Or wait till your PR gets merged?

pho commented Nov 21, 2017

Should we close this now? Or wait till your PR gets merged?

@rodrigc

This comment has been minimized.

Show comment
Hide comment
@rodrigc

rodrigc Nov 21, 2017

Collaborator

Wait until it is merged.

Collaborator

rodrigc commented Nov 21, 2017

Wait until it is merged.

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