I wrote my own module, mainly processing the file field for the django site. After you came across some things related to mod_wsgi (resolved by updating to 3.3), I got my code to run. After all the necessary imports, before defining any classes or functions, I check for the presence of sox, audio communication for the important functions of my modules:
sox = 'path/to/sox' test=subprocess.Popen([sox,'-h'], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) error=test.communicate()[1] if error: raise EnvironmentError((1,'Sox not installed properly'),)
Everything went perfectly. Now I updated ubuntu from 8.04 to 10.04, and the code breaks in the call line of the .Popen subprocess, causing the following error message:
File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child raise child_exception OSError: [Errno 8] Exec format error
I have already looked for sox execution rights, I have no other idea where to look for a solution to this. Is it possible to restrict subprocess execution rights? Any hints what can be done here?
python django ubuntu mod-wsgi
marue
source share