mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Schwartzmeyer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-7658) apply-reviews.py fails with Unicode characters on Windows
Date Tue, 13 Jun 2017 22:49:00 GMT

    [ https://issues.apache.org/jira/browse/MESOS-7658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16048501#comment-16048501
] 

Andrew Schwartzmeyer commented on MESOS-7658:
---------------------------------------------

It looks like the correct solution is to use Python 3, as it has Unicode support on Windows,
whereas [Python 2 does not, and will not|https://stackoverflow.com/questions/1910275/unicode-filenames-on-windows-with-python-subprocess-popen].

> apply-reviews.py fails with Unicode characters on Windows
> ---------------------------------------------------------
>
>                 Key: MESOS-7658
>                 URL: https://issues.apache.org/jira/browse/MESOS-7658
>             Project: Mesos
>          Issue Type: Bug
>         Environment: Windows 10
>            Reporter: Andrew Schwartzmeyer
>            Assignee: Andrew Schwartzmeyer
>
> This prevents commits from being applied if the name or message contains non-ASCII characters,
and so can break the Windows ReviewBot.
> {code}
> > git checkout b2801f0012535e29609f603b4324a9ca693f70cb~
> > python .\support\apply-reviews.py -r 59874
> Traceback (most recent call last):
>   File ".\support\apply-reviews.py", line 381, in <module>
>     reviewboard()
>   File ".\support\apply-reviews.py", line 360, in reviewboard
>     apply_review()
>   File ".\support\apply-reviews.py", line 126, in apply_review
>     commit_patch()
>   File ".\support\apply-reviews.py", line 225, in commit_patch
>     shell(cmd, options['dry_run'])
>   File ".\support\apply-reviews.py", line 111, in shell
>     error_code = subprocess.call(command, stderr=subprocess.STDOUT, shell=True)
>   File "C:\Python27\lib\subprocess.py", line 168, in call
>     return Popen(*popenargs, **kwargs).wait()
>   File "C:\Python27\lib\subprocess.py", line 390, in __init__
>     errread, errwrite)
>   File "C:\Python27\lib\subprocess.py", line 610, in _execute_child
>     args = '{} /c "{}"'.format (comspec, args)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 25: ordinal
not in range(128)
> ~\src\mesos-copy2 |-/
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message