-
Notifications
You must be signed in to change notification settings - Fork 153
Flask: Cannot convert bytes object to java.lang.String #464
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
Comments
I've run your code and it doesn't reproduce the issue. In fact, it doesn't look like your code even uses Also, what version of Chaquopy are you using? |
Version: classpath 'com.chaquo.python:gradle:9.1.0' I uploaded the code to cloned version of your examples repo: The latest commit in the repo is exactly what I'm running. You should be able to reproduce it, I hope :-) The last commit causes the stacktrace below:
|
OK, it looks like there's an incompatibility between the way click accesses stdout and the way Chaquopy redirects it to Logcat. We'll fix this in the next version of Chaquopy. Meanwhile, you can work around the problem by adding the following code to the start of your Python file:
|
Wow it works!! Thank you, this was a major thing for me! |
This issue is fixed in Chaquopy 10.0.1. To upgrade, edit your app's top-level build.gradle file and change the version number of |
Im trying to run flask. During startup if flask, I get the following runtime error:
TypeError: Cannot convert bytes object to java.lang.String
Seems related to call:click.echo()
My code:
The text was updated successfully, but these errors were encountered: