Ticket #1081 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

OSError 13 if current $PATH doesn't lead to Python executable

Reported by: albert Owned by: justinc
Priority: major Milestone:
Component: - Version: 0.1t
Severity: Medium Keywords:
Cc: justinc Blocking:
Blocked By:


On Android, our current way of spawning Seattle from the native app (GUI) does not pass a sufficiently populated $PATH variable. Therefore, nmAPI, safe and probably a couple of other calls to portable_popen.Popen(["python", other_args]) fail like this:

1343986528.71:PID-1501:Traceback (most recent call last):
  File "/mnt/sdcard/sl4a/seattle/seattle_repy/nmrequesthandler.py", line 100, in handle_request
  File "/mnt/sdcard/sl4a/seattle/seattle_repy/nmrequesthandler.py", line 235, in process_API_call
  File "/mnt/sdcard/sl4a/seattle/seattle_repy/nmAPI.py", line 2741, in startvessel
  File "/mnt/sdcard/sl4a/seattle/seattle_repy/nmAPI.py", line 2781, in start_task
  File "/mnt/sdcard/sl4a/seattle/seattle_repy/portable_popen.py", line 31, in Popen
  File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/subprocess.py", line 595, in __init__
  File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/subprocess.py", line 1092, in _execute_child
OSError: [Errno 13] Permission denied

If we call Popen with the full path to the executable as given by sys.executable, e.g. /data/data/com.googlecode.pythonforandroid/files/python/bin/python, it seems to work.

Change History

Changed 7 years ago by justinc

  • owner set to justinc
  • status changed from new to accepted

Changed 7 years ago by justinc

  • status changed from accepted to closed
  • resolution set to fixed

Fixed in r5637.

Note: See TracTickets for help on using tickets.