BusinessObjects Board

error in execution of python in bods script in windows

Hi All,
I tried to run a simple python program in dataservices script
exec(’[$$PythonExePath]’,’[$$PythonLibPath]\[$PythonFunction].py ',0);

Threw error as Cannot find the full path for file <C:/Users/avarghe/AppData/Local/Programs/Python/Launcher/py.exe> <The operation
failed, due to error <50307>: <Function failed to launch program

I tried backslash and forward slash and got the same error

<C:\Users\avarghe\AppData\Local\Program\Python\Launcher\py.exe>, due to error <The operation
failed, due to error <50307>: <Function failed to launch program

my ds environment variable is
DS_USER_DIR=C:\Users\avarghe\AppData\Local\SAP\Data Services

I used substitution parameter
$$PythonExePath=C:\Users\avarghe\AppData\Local\Program\Python\Launcher\py.exe

$$PythonLibPath= gave the file path which job server can access
$PythonFunction=‘test’;

Can someone help me to fix this issue


ambily6 (BOB member since 2018-11-21)

shouldnt it be python.exe and not py.exe ?


jlynn73 :us: (BOB member since 2009-10-27)

Do you have another idea? because python.exe isn’t work neither

exec(‘C:\Program Files\Python311\python.exe’,‘D:\B2\getBoardDataTruck.py’,0);
exec(‘cmd /c D:\B2\getBoardDataTruck.bat’, 0);
exec(‘cmd’,‘cmd /c D:\B2\getBoardDataTruck.bat’, 0);
exec(‘D:\B2\getBoardDataTruck.bat’, ’ ', 0);

what about typos ?

“… Threw error as Cannot find the full path for file <C:/Users/avarghe/AppData/Local/ Programs /Python/Launcher/py.exe> …”

“…I used substitution parameter $$PythonExePath=C:\Users\avarghe\AppData\Local\ Program \Python\Launcher\py.exe…”