user291701
user291701

Reputation: 39681

Can't execute python scripts, permission denied?

I'm trying to compile a project using "appcelerator" (crossplatform dev for iphone/android). Just evaluating it. It seems to run some python scripts to do the build, but can't get it to work (and not getting anywhere on the help forums there). Seems like a permissions error, but I can't figure it out. Thought I'd try here in case this is a familiar thing in python:

Exception occured while building project:
Traceback (most recent call last):
   File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/builder.py", line 2089, in <module>
     s.build_and_run(True, avd_id, device_args=device_args)
   File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/builder.py", line 1934, in build_and_run
     run_result = run.run(dex_args, warning_regex=r'warning: ')
   File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.2/android/run.py", line 36, in run
     process = subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
   File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
     errread, errwrite)
   File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
     raise child_exception
 OSError: [Errno 13] Permission denied

I've set the permissions for "run.py" and "builder.py" to 777. The "subprocess.py" file also is 777. I'm still getting the permission denied error. Is there something obvious I'm missing here? I'm an admin user, on os 10.6.

Thanks

Upvotes: 3

Views: 8640

Answers (1)

jcollado
jcollado

Reputation: 40384

The problem isn't in any of the python files you mention, but in whatever command that should be executed by the subprocess.Popen statement.

To troubleshoot the problem you can try to use pdb to debug the problem or just edit run.py and add:

print args

just before subprocess.Popen to figure out what's the command for which there aren't enough permissions.

Upvotes: 3

Related Questions