-
Notifications
You must be signed in to change notification settings - Fork 140
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
Python.start(new AndroidPlatform(this)) doesnt work #513
Comments
As it says in #307, ".pth" files in the top-level source directory will be treated as path configuration files. If this is intentional, please explain what you're trying to do. Or if the file contains something else like a PyTorch model, you'll have to either rename it to have a different extension, or put it in a subdirectory rather than in the source code root. |
I have put the .pth file in subdirectory and it is the result of pytorch model training and cannot rename. I just wonder it worked at the beginning, but suddenly "Python.start(new AndroidPlatform(this)) crash". Anyway, is there any code I can use to kill Python and re-start again? thx. |
I just find out I need to change .pth file to pytouch model to load into mobile, so the issue has been solved. |
If you're generating the .pth file at runtime, then that would explain why it works the first time you start the process but crashes the second time. However, as it says in the documentation, you shouldn't write any files to this location at runtime because they may be deleted when the app is upgraded. Instead, write files under You can stop the process in the usual way using |
I use chaquo 9.1.0. Try to integrate the python (v3.8) script to android studio with following coding. After running a few times of loading .pth. The"Python.start(new AndroidPlatform(this));" - crash with the following message.
I dont know how to solve it or can I stop the current Python.start() in the emulator or android, or any coding to prevent this happening?
The text was updated successfully, but these errors were encountered: