Python命令erro 500

时间:2015-05-24 19:40:48

标签: python subprocess

我正在尝试执行subprocess.Popen()命令。但是当我的JavaScript通过XmlHttpRequest()调用程序时,它返回错误500。

错误是:

  

获取http://177.55.99.146:8080/autenticacao/autentica?arquivo=[object%20File] 500(内部服务器错误)

我的代码:

import subprocess
from subprocess import Popen, PIPE, STDOUT
def chamaProg(arquivo): 
   p = Popen(['java -Djava.library.path="C:\\Nitgen" -jar C:\\Nitgen\\Busca3-N_java.jar',arquivo], stdin=arquivo, stdout=PIPE, stderr=STDOUT, close_fds=True)
   output = p.stdout.read()
   print output   
   return p

我做错了什么?

1 个答案:

答案 0 :(得分:0)

A 500 Error Code is a Server Side Error. This means that you are likely requesting an action that the server does not know how to handle. For information on Standard Server Return codes check out this page