Skip to content

Fixing unicode error#501

Merged
inclement merged 1 commit into
kivy:masterfrom
dl1ksv:toolchain_unicode_patch
Nov 28, 2015
Merged

Fixing unicode error#501
inclement merged 1 commit into
kivy:masterfrom
dl1ksv:toolchain_unicode_patch

Conversation

@dl1ksv

@dl1ksv dl1ksv commented Nov 28, 2015

Copy link
Copy Markdown
Contributor

The updated toolchain.py fails if the output of shprint contains unicode characters.
This can happen if you use something like:

shprint(sh.cp, '-v', entry, self.ctx.get_libs_dir(arch.arch))

and results in:

File "/usr/lib64/python2.7/site-packages/python_for_android-0.3-py2.7.egg/pythonforandroid/toolchain.py", line 2312, in build_recipes
recipe.postbuild_arch(arch)
File "/usr/lib64/python2.7/site-packages/python_for_android-0.3-py2.7.egg/pythonforandroid/recipes/qt5base/__init__.py", line 118, in postbuild_arch
  shprint(sh.cp, '-v', entry,  self.ctx.get_libs_dir(arch.arch))
File "/usr/lib64/python2.7/site-packages/python_for_android-0.3-py2.7.egg/pythonforandroid/toolchain.py", line 187, in shprint
shorten_string(msg, msg_width), width=msg_width))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u201e' in position 0: ordinal not in range(128)

This fixed by this patch.

inclement added a commit that referenced this pull request Nov 28, 2015
@inclement inclement merged commit 52cf072 into kivy:master Nov 28, 2015
@inclement

Copy link
Copy Markdown
Member

Nice, thanks.

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

Successfully merging this pull request may close these issues.

2 participants