python - subprocess.popen not working in apache with mod_wsgi 3.5 -
I have a function in my app that calls a subprocess popen . Which prints an Excel file using the Microsoft Excel.Office.Interop.Excel library, when I start the server with the manage.py driver the call becomes very well And my .exe does the job, but when I start the Apache server (also with the administrator user), everything is fine except for the subprocess part, and it does not call the command only.
I put some the console. Type In my exe I know where the problem is when I run on the DNS server, it all goes well, but whith apache, interop throws this error to me:
Microsoft Excel can not get any saved passwords, 'E: //Documents/092647282000.xls'. Puede inspires different effects: \ x07 alphabet at La Rita del archive no explanation. The \ X07 ORRO program \ Xac X & DO collection \ X07 is known about al book that \ x10 is a very important book to protect the hospitality, which is so far for this time. Actually it says that the file is not found or another program is using it or the book I am trying to save is the same name (but I open it I'm not saving it). This distribution does not happen with runner command how can I run this system (console) command to Apache? Argsappend ('ImprimirExcel.exe') args.append (a) args.append (self.impresora) proc = subprocess.Popen (args, Stdin = subprocess.PIPE, stdout = subprocess .PIPE, stderr = subprocess.STDOUT, shell = true, close_fds = False) (stdout_txt, stderr_txt) = proc.communicate ("") proc.wait () logging. Terror ('% d% s% s'% (proc X.50):
Notes:
To create XAMPP, I logging.error < / Code>. This message saves the error in the error log (easy access).
I am using Windows 8 with XAMPP
I have a Python 2.7, Django 1.7 and Apache (Apache / 2.4.7 (Win32) OpenSSL / 1.0.1e mod_wsgi / 3.5 Python / 2.7.8 PHP / 5.5.6)
This is my httpd.conf
... LoadModule Wsgi_module module / mod_wsgi.so ... WSGIScriptAlias / App "E: / Documents / App / App / App / Wsgi.py" Alias / Media "E: / Documents / App / app / media "sub All the given & lt; / directory & gt; & lt; directory "/ dir / static" e: / docs / app / app / stable "& lt; directory" e: / docs / app / app / static " E: / docs / app / app / media "& gt; all given & lt; / directory & gt; & lt; directory" e: / docs / app / app "& gt; & lt; files wsgi.py & Gt; All given & lt; / files & gt; & lt; / directory & gt;
stdout = PIPE uses the stdout of the original process (i.e. the wsgi module), but in this case, it is closed.
Comments
Post a Comment