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

LookupError: unknown encoding: hex #30

Open
GoogleCodeExporter opened this issue Dec 16, 2015 · 1 comment
Open

LookupError: unknown encoding: hex #30

GoogleCodeExporter opened this issue Dec 16, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Compile the project on Eclipse & deploy standard hello.py to an Android 2+ 
phone
2. Compile the project on Eclipse & deploy standard hello.py to an Android 4+ 
phone

What is the expected output? What do you see instead?

Both phones should toast a hello world message, but android 4.1+ phones will 
ran the service but not toast.

Please provide any additional information below.

I managed to discover the root cause by the adb shell: 

>>> import binascii
ImportError: Cannot load library: link_image[1891]:  8804 could not load needed 
library 'libz.so' for 'binascii.so' (get_lib_extents[742]:  8804 - libz.so is 
not a valid ELF object)

So, I renamed binascii.so to _binascii.so and copied the contents of 
https://gist.github.com/alanjds/6091309 as binascii.py (file attached) . 
Repacked python_27.zip and deployed. Now it works on both Android 2.3+ and 
Android 4.1+

Original issue reported on code.google.com by [email protected] on 26 Jul 2013 at 7:04

Attachments:

@GoogleCodeExporter
Copy link
Author

The root cause must be something else (device dependent), I just tested on 
Android 4.1.2 and 4.2.2 and the toast is displaying, also "import binascii" 
succeed.

What you can try is to get the logcat of the install, it may tell why it's not 
working on your device. 

Original comment by [email protected] on 29 Jul 2013 at 8:32

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

No branches or pull requests

1 participant