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

lxml uses etree.so that throws an unexpected e_machine error #1147

Closed
dav01it opened this issue Oct 22, 2017 · 4 comments
Closed

lxml uses etree.so that throws an unexpected e_machine error #1147

dav01it opened this issue Oct 22, 2017 · 4 comments

Comments

@dav01it
Copy link

dav01it commented Oct 22, 2017

If I use lxml in my app the app crashes with this error:
logcat:

ImportError: dlopen failed: "/data/data/org.apptest.test/files/app/lib/python2.7/site-packages/lxml/etree.so" has unexpected e_machine: 3

I tried in a 64bit and 32bit debian installation, message changes, so I suspect that etree.so is compiled with the hosting machine on which buildozer runs instead of the target android machine.

in 64 bit enviroment I get:

ImportError: dlopen failed: "/data/data/org.apptest.test/files/app/lib/python2.7/site-packages/lxml/etree.so" is 64-bit instead of 32-bit

@therealmarv
Copy link

lxml is a library around libxslt & libxml. So it's more or less a beautiful interface to handle a native system library and python for android does not support that.

@dav01it
Copy link
Author

dav01it commented Nov 13, 2017

Ok.. going to avoid lxml... looking for a portable alternative to navigate an xml structure; I mean some complex one. any Ideas? I've found very useful "suds" to parse an xml web service response but its documentation is very poor and I'm not able to use it for a plain xml (i.e without webservices, soap envelope and wsdl)

@therealmarv
Copy link

therealmarv commented Nov 13, 2017

I think https://docs.python.org/3/library/xml.etree.elementtree.html is Python only (this is the standard). I would also look into html5lib or Beautifulsoup. If you want to navigate through a XML I would also suggest to google for "pure python xpath", there are a bunch of libraries out there.

@dav01it
Copy link
Author

dav01it commented Nov 14, 2017

Thanks I close the Issue. Useful answer!

@dav01it dav01it closed this as completed Nov 14, 2017
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