Возникла проблема с вызовом другого скрипта, кстати, он прекрасно работает с консоли, когда я просто вызываю python main.py (который затем вызывает test3.py), но когда я делаю это через веб-сервер, он выдает ошибку ниже, котораяcryptic
Я не могу назвать это (test3 - это просто распечатка ...)
#proc = subprocess.Popen(['python', 'test3.py'], stdout=subprocess.PIPE)
, но это прекрасно работает
proc = subprocess.Popen(['ls', '-la'], stdout=subprocess.PIPE)
Ошибка входа в систему / var/log/httpd-error.log в FreeBSD
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] Traceback (most recent call last):
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] File "/usr/local/www/apache22/data/main2.py", line 22, in <module>
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61]
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] proc = subprocess.Popen(['python', 'test3.py'], stdout=subprocess.PIPE)
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61]
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] errread, errwrite)
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] File "/usr/local/lib/python2.7/subprocess.py", line 1228, in _execute_child
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61]
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] raise child_exception
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] OSError
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] :
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] [Errno 2] No such file or directory
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61]
[Thu Mar 01 12:26:55 2012] [error] [client 64.102.194.61] File does not exist: /usr/local/www/apache22/data/favicon.ico