1

I'm running a simple Python webjob in an Azure Linux webapp.

I am getting this error

Run script 'webjob.py' with script host - 'PythonScriptHost'
f24041: SYS INFO] Status changed to Running
 f24041: ERR ] An error occurred trying to start process 'python.exe' with working directory '/tmp/jobs/continuous/test/qsinu4ck.4pl'. No such file or directory f24041: SYS ERR ] System.AggregateException: One or more errors occurred. (An error occurred trying to start process 'python.exe' with working directory '/tmp/jobs/continuous/test/qsinu4ck.4pl'. No such file or directory)
 ---> System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'python.exe' with working directory '/tmp/jobs/continuous/test/qsinu4ck.4pl'. No such file or directory 

What can I try next?

3
  • what is your runtime stack? Commented Jan 10 at 13:11
  • Please provide your webjob code. Commented Jan 10 at 13:26
  • The error An error occurred trying to start process 'python.exe' suggests there is something that requires a Windows environment in your code or your config. I assume if you're in a Linux environment, that won't work. Commented Jan 11 at 15:28

1 Answer 1

0

I created a sample python WebJob script and successfully uploaded it to Azure WebJobs without any issues.

  • The issue is related to PythonScriptHost because the linux App service's webjob is still in preview.

  • You need to create the .sh file along with your python file.

My webjob .py:

print("hello")

script .sh:

python3  webjob.py

I've zipped these files and uploaded it to Azure webjobs.

enter image description here

Here's the output logs:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.