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

UTF-8 Encoding Error, __init.py__ 0.15-dev #108

Closed
yagupta opened this issue Apr 23, 2014 · 2 comments
Closed

UTF-8 Encoding Error, __init.py__ 0.15-dev #108

yagupta opened this issue Apr 23, 2014 · 2 comments

Comments

@yagupta
Copy link

yagupta commented Apr 23, 2014

When attempting to package w/ Buildozer, I see an issues in UTF-8 conversion. Upon inspection in file init.py (for buildozer)

This snippet of code :

process.communicate()
if process.returncode != 0 and break_on_error:
print "[YaGupta-Debug] - Self.CMD Failed, %s" % (command)
self.error('Command failed: {0}'.format(command))
raise BuildozerCommandException()
if ret_stdout:
ret_stdout = b''.join(ret_stdout)
ret_stdout = ret_stdout[0:10741]
if ret_stderr:
ret_stderr = b''.join(ret_stderr)
return (ret_stdout.decode('utf-8') if ret_stdout else None,
ret_stderr.decode('utf-8') if ret_stderr else None,
process.returncode)

Fails the UTF-8 Call (the code above has a few edit from me)

It fails because, there is a character below Intel?VT which fails.


id: 42 or "extra-intel-Hardware_Accelerated_Execution_Manager"
Type: Extra
Desc: Intel x86 Emulator Accelerator (HAXM installer), revision 4
By Intel Corporation
Emulation speedup using Intel? VT processor technology. Read more
at www.intel.com/software/android
Install path: extras/intel/Hardware_Accelerated_Execution_Manager

@yagupta
Copy link
Author

yagupta commented Apr 23, 2014

Seems like if I modify the file "init.py"

from :
return (ret_stdout.decode('utf-8') if ret_stdout else None,
ret_stderr.decode('utf-8') if ret_stderr else None,
process.returncode)

to :

return (ret_stdout.decode('utf-8', 'ignore') if ret_stdout else None,
ret_stderr.decode('utf-8', 'ignore') if ret_stderr else None,
process.returncode)

maybe this is a potential fix.

@tito tito closed this as completed in a597485 May 1, 2014
tito added a commit that referenced this issue May 1, 2014
Ignore UTF-8 decoding errors. Closes #108
@hanattaw
Copy link

hanattaw commented Nov 8, 2014

But for me i edited.

File "/usr/local/lib/python2.7/site-packages/buildozer/libs/pexpect.py", line 837
File "/usr/local/lib/python2.7/site-packages/buildozer/libs/pexpect.py", line 1381, in expect_loop

then editor 2 lines in codec (from here https://docs.python.org/2/library/codecs.html)

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

No branches or pull requests

2 participants