Xavier de Gaye added the comment: An interactive session confirms that the problem is indeed with the command line arguments of python invoked by subprocess (and the problem is fixed by the patch):
>>> from test.support import FS_NONASCII >>> cmd = "assert(ord(%r) == %s)" % (FS_NONASCII, ord(FS_NONASCII)) >>> exec(cmd) >>> import subprocess, sys >>> subprocess.run([sys.executable, '-c', cmd]) Unable to decode the command from the command line: UnicodeEncodeError: 'utf-8' codec can't encode characters in position 12-13: surrogates not allowed CompletedProcess(args=['/data/data/org.bitbucket.pyona/python/bin/python', '-c', "assert(ord('\xe6') == 230)"], returncode=1) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26919> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com