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

import wxpy module fail #1897

Closed
elliywang opened this issue Jun 28, 2019 · 2 comments
Closed

import wxpy module fail #1897

elliywang opened this issue Jun 28, 2019 · 2 comments
Labels

Comments

@elliywang
Copy link

Versions

  • Python:2.7
  • OS: windows
  • Kivy:1.11.0
  • Cython: 0.29.9
    ###Description

I use wxpy in my code, and use buldozer to build app, building is ok, but app broke when run my app in Android.
And this error disappear if not import wxpy.
I have add other modules which related to wxpy to applibs

buildozer.spec

Command:
buildozer -v android debug

Spec file:

title = wxpy_test
package.name = application
package.domain = org.test
...
version = 0.1
requirements = kivy,wxpy

Logs

06-04 19:29:57.688 19026 19062 I python : Android kivy bootstrap done. name is main
06-04 19:29:57.688 19026 19062 I python : Run user program, change dir and execute main.py
06-04 19:29:57.873 19026 19062 I python : [INFO ] [Logger ] Record log in /data/user/0/org.test.application/files/.kivy/logs/kivy_19-06-04_1.txt
06-04 19:29:57.874 19026 19062 I python : [INFO ] [Kivy ] v1.11.0
06-04 19:29:57.874 19026 19062 I python : [INFO ] [Kivy ] Installed at "/data/user/0/org.test.application/files/lib/python2.7/site-packages/kivy/init.pyo"
06-04 19:29:57.875 19026 19062 I python : [INFO ] [Python ] v2.7.2 (default, Jun 27 2019, 05:43:03)
06-04 19:29:57.875 19026 19062 I python : [GCC 4.8]
06-04 19:29:57.875 19026 19062 I python : [INFO ] [Python ] Interpreter at ""
06-04 19:29:57.880 19026 19062 I python : [WARNING] [Deprecated ] Python 2 Kivy support has been deprecated. The Kivy release after 1.11.0 will not support Python 2 anymore
06-04 19:29:57.897 19026 19062 W linker : /data/data/org.test.application/files/libpymodules.so: is missing DT_SONAME will use basename as a replacement: "libpymodules.so"
06-04 19:29:57.925 19026 19062 I python : [INFO ] [Factory ] 184 symbols loaded
06-04 19:29:58.741 19026 19062 I python : /data/user/0/org.test.application/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:18: RuntimeWarning: import cdrom: No module named cdrom
06-04 19:29:58.741 19026 19062 I python : (ImportError: No module named cdrom)
06-04 19:29:58.757 19026 19062 I python : [INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil, img_ffpyplayer ignored)
06-04 19:29:58.781 19026 19062 I python : [INFO ] [Text ] Provider: pygame
06-04 19:29:59.726 691 714 I zygote : Explicit concurrent copying GC freed 80954(3MB) AllocSpace objects, 1(20KB) LOS objects, 42% free, 6MB/11MB, paused 261us total 131.758ms
06-04 19:30:00.584 1337 1337 I /system/bin/mpdecision: type=1400 audit(0.0:2542): avc: denied { write } for comm=504F5349582074696D65722035 name="pb" dev="tmpfs" ino=16925 scontext=u:r:init:s0 tcontext=u:object_r:socket_device:s0 tclass=sock_file permissive=1
06-04 19:30:01.518 19026 19062 I python : Python for android ended.
06-04 19:30:01.522 19026 19062 I org.test.application:python: System.exit called, status: 0
06-04 19:30:01.522 19026 19062 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.
06-04 19:30:01.549 691 792 W InputDispatcher: channel '8e318c8 org.test.application/org.renpy.android.PythonActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
06-04 19:30:01.549 691 792 E InputDispatcher: channel '8e318c8 org.test.application/org.renpy.android.PythonActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
06-04 19:30:01.549 691 1478 I ActivityManager: Process org.test.application:python (pid 19026) has died: fore TOP

@elliywang
Copy link
Author

main.py

import kivy
kivy.require('1.11.0')
from kivy.app import App
from kivy.uix.button import Button
import wxpy

class test(App):
def build(self):
return Button(text='hello world')

if name == 'main':
test().run()

@ghost
Copy link

ghost commented Jul 29, 2019

I can't actually see an error backtrace in your output above, which is a bit strange. Maybe the app just terminated regularly?

However, if the import is causing this then this likely is because of wxpy not supporting Android, and may require a recipe to make it work: https://python-for-android.readthedocs.io/en/latest/recipes/ (or alternatively upstream changes) Without seeing the exact import error backtrace and also being familiar with wxpy (which I don't think any of us is) this will be difficult to get working, but you can try to write a recipe yourself if you can find out what change wxpy needs to work on Android

@ghost ghost added the support label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants