I am attempting to schedule Python scripts to run on a regular basis using Azure. Following the steps here, I have created a WebJob inside a Web App. To the WebJob I have uploaded .zip folder containing my Python script and these modules.
My code is very simple:
import pandas as pd
A = [1,2,3,4]
B = ['a','b','c','d']
df = pd.DataFrame({'a':A,'b':B})
print(df)
On running the WebJob, I get the following error:
[06/17/2019 16:48:27 > e6e459: SYS INFO] Status changed to Initializing
[06/17/2019 16:49:01 > e6e459: SYS INFO] Run script 'Test12.py' with script host - 'PythonScriptHost'
[06/17/2019 16:49:01 > e6e459: SYS INFO] Status changed to Running
[06/17/2019 16:49:01 > e6e459: ERR ] Traceback (most recent call last):
[06/17/2019 16:49:01 > e6e459: ERR ] File "Test12.py", line 1, in <module>
[06/17/2019 16:49:01 > e6e459: ERR ] import pandas as pd
[06/17/2019 16:49:01 > e6e459: ERR ] File "D:\local\Temp\jobs\triggered\Test12\2bjz15ce.qpm\pandas\__init__.py", line 13, in <module>
[06/17/2019 16:49:01 > e6e459: ERR ] __import__(dependency)
[06/17/2019 16:49:01 > e6e459: ERR ] File "D:\local\Temp\jobs\triggered\Test12\2bjz15ce.qpm\numpy\__init__.py", line 142, in <module>
[06/17/2019 16:49:01 > e6e459: ERR ] from . import core
[06/17/2019 16:49:01 > e6e459: ERR ] File "D:\local\Temp\jobs\triggered\Test12\2bjz15ce.qpm\numpy\core\__init__.py", line 23, in <module>
[06/17/2019 16:49:01 > e6e459: ERR ] WinDLL(os.path.abspath(filename))
[06/17/2019 16:49:01 > e6e459: ERR ] File "D:\Python34\lib\ctypes\__init__.py", line 348, in __init__
[06/17/2019 16:49:01 > e6e459: ERR ] self._handle = _dlopen(self._name, mode)
[06/17/2019 16:49:01 > e6e459: ERR ] OSError: [WinError 193] %1 is not a valid Win32 application
[06/17/2019 16:49:01 > e6e459: SYS INFO] Status changed to Failed
[06/17/2019 16:49:01 > e6e459: SYS ERR ] Job failed due to exit code 1
How can I solve this?