Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > subprocess.check_call() fails ... but only on my production machine

Reply
Thread Tools

subprocess.check_call() fails ... but only on my production machine

 
 
Chris Curvey
Guest
Posts: n/a
 
      10-12-2010
I've got a python program running on windows that executes a command-
line script. The command being executed is:

>>> print cmd

"C:\Program Files\ImageMagick-6.6.1-Q16\convert.exe" -density 72x72 "c:
\temp\choicepoint 2010-01 Stmt_p1.pdf" -quiet -region (612.0x70.0+0+0 -
blur 0x3) -region (612.0x709.0+0+83.0 -blur 0x3) "\\fs4\w
\13\132651\BILLING_PROOFS\132651_choicepoint 2010-01 Stmt_p1_r1.pdf"

>>> subprocess.check_call(cmd, shell=True)


if I run the command thru python subprocess.check_call() on my
Windows 7 (development) machine, it works fine.
if I run the command in a command in a command window on my windows
2007 server (production) machine, it works fine.
if I run the command thru python subprocess.check_call() on my
Windows 2007 server (production) machine, it fails.

I'm running both the Python script and the command window as the same
user. Can anyone give me a hint as to what might be happening...or a
way to get more information about what the error is? (All I get is
"Command returned non-zero exit status 1")
 
Reply With Quote
 
 
 
 
Chris Curvey
Guest
Posts: n/a
 
      10-12-2010
just a note that the "Windows 2007 Server" is actually a "Windows 2008
Server" (despite the fact that Control Panel->System tells me it's
2007...but that's a different discussion)
 
Reply With Quote
 
 
 
 
Tim Golden
Guest
Posts: n/a
 
      10-13-2010
On 12/10/2010 14:31, Chris Curvey wrote:
> I've got a python program running on windows that executes a command-
> line script. The command being executed is:
>
>>>> print cmd

> "C:\Program Files\ImageMagick-6.6.1-Q16\convert.exe" -density 72x72 "c:
> \temp\choicepoint 2010-01 Stmt_p1.pdf" -quiet -region (612.0x70.0+0+0 -
> blur 0x3) -region (612.0x709.0+0+83.0 -blur 0x3) "\\fs4\w
> \13\132651\BILLING_PROOFS\132651_choicepoint 2010-01 Stmt_p1_r1.pdf"
>
>>>> subprocess.check_call(cmd, shell=True)

>
> if I run the command thru python subprocess.check_call() on my
> Windows 7 (development) machine, it works fine.
> if I run the command in a command in a command window on my windows
> 2007 server (production) machine, it works fine.
> if I run the command thru python subprocess.check_call() on my
> Windows 2007 server (production) machine, it fails.
>
> I'm running both the Python script and the command window as the same
> user. Can anyone give me a hint as to what might be happening...or a
> way to get more information about what the error is? (All I get is
> "Command returned non-zero exit status 1")


The subprocess code has changed quite a bit between
versions. Can you confirm which version of Python you're
using?

FWIW, subprocess.check_call is a lightweight wrapper around subprocess.call
so running the same code as subprocess.call should give you more
information.

TJG
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to upload file to DB works locally but fails on production se Raj ASP .Net 4 07-15-2009 02:10 PM
Login fails on server but works on dev machine, very strange Carl ASP .Net Security 1 08-04-2006 08:13 PM
JRE is machine dependent but compiler is machine independent jrefactors@hotmail.com Java 4 12-10-2004 07:11 PM
impersonation fails on production machine Seth Darr ASP .Net 2 10-06-2004 07:32 PM



Advertisments