sofdigital / DroidPython

Python app development with SL4A in Android Studio
MIT License
55 stars 17 forks source link

open failed: ENOENT #2

Closed viperfx closed 8 years ago

viperfx commented 8 years ago

I am running the program on an Android Device now (Nexus 5) and I get the following error in logcat, however I do see the toast message on the phone so everything seems normal.

01-01 16:05:56.608 12242-12273/com.android.python27 I/PythonAPK: Executing /data/user/0/com.android.python27/files/python/bin/python with arguments [/data/user/0/com.android.python27/files/hello.py, --foreground] and with environment {ANDROID_ROOT=/system, AP_PORT=41832, AP_HANDSHAKE=1dce96e1-eb2a-490b-b318-ffb8a5a2ae88, ANDROID_BOOTLOGO=1, AP_HOST=127.0.0.1, LD_LIBRARY_PATH=/data/user/0/com.android.python27/files/python/lib:/data/user/0/com.android.python27/files/python/lib/python2.7/lib-dynload, EXTERNAL_STORAGE=/sdcard, SYSTEMSERVERCLASSPATH=/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar, PYTHONHOME=/data/user/0/com.android.python27/files/python, ANDROID_SOCKET_zygote=12, PYTHONPATH=/data/user/0/com.android.python27/files/packages/python:/data/user/0/com.android.python27/files/python/lib/python2.7/lib-dynload:/data/user/0/com.android.python27/files/python/lib/python2.7, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_DATA=/data, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, TEMP=/data/user/0/com.android.python27/files/packages/tmp, BOOTCLASSPATH=/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/apache-xml.jar:/system/framework/org.apache.http.legacy.boot.jar, ANDROID_PROPERTY_WORKSPACE=10,0, ANDROID_STORAGE=/storage}
01-01 16:05:56.627 12242-12273/com.android.python27 E/sl4a.StreamGobbler:108: Error
                                                                              java.io.FileNotFoundException: /storage/emulated/0/com.android.python27/hello.py.log: open failed: ENOENT (No such file or directory)
                                                                                  at libcore.io.IoBridge.open(IoBridge.java:452)
                                                                                  at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
                                                                                  at com.trilead.ssh2.StreamGobbler.<init>(StreamGobbler.java:106)
                                                                                  at com.android.python27.process.Process.start(Process.java:140)
                                                                                  at com.android.python27.process.InterpreterProcess.start(InterpreterProcess.java:137)
                                                                                  at com.android.python27.process.MyScriptProcess.launchScript(MyScriptProcess.java:61)
                                                                                  at com.android.python27.BackgroundScriptService.startMyMain(BackgroundScriptService.java:182)
                                                                                  at com.android.python27.BackgroundScriptService.access$000(BackgroundScriptService.java:45)
                                                                                  at com.android.python27.BackgroundScriptService$startMyAsyncTask.doInBackground(BackgroundScriptService.java:138)
                                                                                  at com.android.python27.BackgroundScriptService$startMyAsyncTask.doInBackground(BackgroundScriptService.java:131)
                                                                                  at android.os.AsyncTask$2.call(AsyncTask.java:295)
                                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                  at java.lang.Thread.run(Thread.java:818)
                                                                               Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
                                                                                  at libcore.io.Posix.open(Native Method)
                                                                                  at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
                                                                                  at libcore.io.IoBridge.open(IoBridge.java:438)
                                                                                  at java.io.FileOutputStream.<init>(FileOutputStream.java:87) 
                                                                                  at com.trilead.ssh2.StreamGobbler.<init>(StreamGobbler.java:106) 
                                                                                  at com.android.python27.process.Process.start(Process.java:140) 
                                                                                  at com.android.python27.process.InterpreterProcess.start(InterpreterProcess.java:137) 
                                                                                  at com.android.python27.process.MyScriptProcess.launchScript(MyScriptProcess.java:61) 
                                                                                  at com.android.python27.BackgroundScriptService.startMyMain(BackgroundScriptService.java:182) 
                                                                                  at com.android.python27.BackgroundScriptService.access$000(BackgroundScriptService.java:45) 
                                                                                  at com.android.python27.BackgroundScriptService$startMyAsyncTask.doInBackground(BackgroundScriptService.java:138) 
                                                                                  at com.android.python27.BackgroundScriptService$startMyAsyncTask.doInBackground(BackgroundScriptService.java:131) 
                                                                                  at android.os.AsyncTask$2.call(AsyncTask.java:295) 
                                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                                                                  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                                                                  at java.lang.Thread.run(Thread.java:818) 
michaelrinderle commented 8 years ago

couple things i can think of off the top of my head...

04-19 16:25:11.201 26543-26543/com.android.python27 E/ActivityThread: Pause GC java.lang.reflect.InvocationTargetException

either way, that log file was always useless. i meant to get rid of it when i changed the way the python executable, scripts and std library was stored from external storage to the private user space i just couldn't find where it was coming from yet. next commit, i'll take care of that...