Skip to content

Python file is not converted to bytecode when building apk #257

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

Closed
MohsenHassani opened this issue Jul 31, 2014 · 1 comment
Closed

Python file is not converted to bytecode when building apk #257

MohsenHassani opened this issue Jul 31, 2014 · 1 comment

Comments

@MohsenHassani
Copy link

Hello guys,

For using RESTful API, I had to install and use requests package.

So, for building the app, I had to do:
./distribute.sh -m "kivy requests==2.1.0 urllib3"

After making and installing the app, it would not open on my HTC.
Debugging it using adb logcat I noticed an error related to my problem:
SyntaxError: Non-ASCII character '\xa3' in file when function returns...
in the file:
/data/data/a.b.c/files/lib/python2.7/site-packages/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py

Taking a look at the packages within the path, I noticed all files have the extension pyo but this one was in py. I changed the extension to pyo and it solved my problem. The app opened successfully.

So I guess there is a bug or something with the converter for not distributing it in pyo?

@inclement
Copy link
Member

I haven't seen this come up more, so I'll close it as not reproducible. If anyone gets the problem again, especially if it can be reproduced, feel free to raise it again.

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