0

I have the following task:

@task(track_started = True)
def run_transcode_server():
    commands = ('java', '-cp', settings.TRANSCODE_CLASSPATH, settings.TRANSCODE_JAVA_CLASS)
    subprocess.call(commands)

Making the call to subprocess.call directly in the django shell works just fine. However, when celery tries to run that task, it causes this error: WindowsError: [Error 5] Access is denied.

I am running everything under the same user (this is my development environment).

What is causing this? Why can't celery execute subprocesses?

Marcin
  • 48,559
  • 18
  • 128
  • 201

1 Answers1

1

Something similar here: https://stackoverflow.com/a/7130809/1049127

Did you try writing the full path to the Java executable?

Community
  • 1
  • 1
StefanoP
  • 3,798
  • 2
  • 19
  • 26
  • It turns out that I forgot that although the shell works with `java`, when I call it from pythong, I need to call `java.exe`. – Marcin Jan 28 '12 at 16:03