chaquopy: Crash using pylsl

Chaquopy version

Version 7.0

Relevant parts of your code

# test LSL
outlet = StreamInfo(name='myStream', type='EEG', channel_count=8)
print(outlet)

Describe your issue

I use beeware, when i build the app i have no problem but when i start the app, the app crashes.

The error

--------- beginning of crash
04-25 13:53:26.294 15061 15061 E AndroidRuntime: FATAL EXCEPTION: main
04-25 13:53:26.294 15061 15061 E AndroidRuntime: Process: com.example.appvisulsl, PID: 15061
04-25 13:53:26.294 15061 15061 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.appvisulsl/org.beeware.android.MainActivity}: com.chaquo.python.PyException: RuntimeError: LSL binary library file was not found. Please make sure that the binary file can be found in the package lib folder
04-25 13:53:26.294 15061 15061 E AndroidRuntime:  (/data/data/com.example.appvisulsl/files/chaquopy/AssetFinder/requirements/pylsl/lib)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:  or the system search path. Alternatively, specify the PYLSL_LIB environment variable.
04-25 13:53:26.294 15061 15061 E AndroidRuntime:  You can install the LSL library with conda: `conda install -c conda-forge liblsl`
04-25 13:53:26.294 15061 15061 E AndroidRuntime: or otherwise download it from the liblsl releases page assets: https://github.com/sccn/liblsl/releases
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:201)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:288)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7872)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
04-25 13:53:26.294 15061 15061 E AndroidRuntime: Caused by: com.chaquo.python.PyException: RuntimeError: LSL binary library file was not found. Please make sure that the binary file can be found in the package lib folder
04-25 13:53:26.294 15061 15061 E AndroidRuntime:  (/data/data/com.example.appvisulsl/files/chaquopy/AssetFinder/requirements/pylsl/lib)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:  or the system search path. Alternatively, specify the PYLSL_LIB environment variable.
04-25 13:53:26.294 15061 15061 E AndroidRuntime:  You can install the LSL library with conda: `conda install -c conda-forge liblsl`
04-25 13:53:26.294 15061 15061 E AndroidRuntime: or otherwise download it from the liblsl releases page assets: https://github.com/sccn/liblsl/releases
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.pylsl.pylsl.<module>(pylsl.py:1296)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.java.chaquopy.import_override(import.pxi:26)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.pylsl.<module>(__init__.py:2)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.java.chaquopy.import_override(import.pxi:26)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.appvisulsl.app.<module>(app.py:12)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.java.chaquopy.import_override(import.pxi:26)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.__main__.<module>(__main__.py:1)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.runpy._run_code(runpy.py:87)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.runpy._run_module_code(runpy.py:97)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.runpy.run_module(runpy.py:207)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.chaquopy_java.call(chaquopy_java.pyx:354)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at <python>.chaquopy_java.Java_com_chaquo_python_PyObject_callAttrThrowsNative(chaquopy_java.pyx:326)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at com.chaquo.python.PyObject.callAttrThrowsNative(Native Method)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at com.chaquo.python.PyObject.callAttrThrows(PyObject.java:232)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at com.chaquo.python.PyObject.callAttr(PyObject.java:221)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at org.beeware.android.MainActivity.onCreate(MainActivity.java:85)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:8305)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:8284)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
04-25 13:53:26.294 15061 15061 E AndroidRuntime:        ... 12 more
04-25 13:53:26.368 15061 15061 I Process : Sending signal. PID: 15061 SIG: 9

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 1
  • Comments: 38 (16 by maintainers)

Most upvoted comments

Let’s leave the issue open until I’ve added the packages to the main repository.