Discussion Board for collaboration related to QlikView App Development.
I am trying to run python script inside my load script in Qlik Sense app.
I know that I need to put OverrideScriptSecurity=1 in Settings.ini
Execute py lib://python/getSolution.py 12 'ble';
and I get no error in qlik sense, bu script is not executed (I think) because inside the script I have
f = open("file.xml", "wb")
and file is not saved.
If I run script from terminal, then script is properly executed.
What could go wrong?
You misunderstood me. I meant "can you add a full path to the command you are trying to execute using the EXECUTE script statement".
Most of these EXECUTE problems have to do with the fact that the Windows shell can't find the program to execute. Even cmd.exe may require a full path sepcification before it can be found.
hmmm I can see your point...
Now I try with :
Set vPythonPath = "C:\Users\Marko Z\AppData\Local\Programs\Python\Python37-32\python.exe";
Set vPythonFile = "C:\Users\Marko Z\Documents\Qlik\Sense\....\getSolution.py";
Execute $(vPythonPath) $(vPythonFile);
But it still doesn't work...
Is there a way that python would writ in console... so that I would see if it is executing.... I see that if I mistype the path Qlik Sense give me an error
The handle is invalid:,.....
Is this mean that if no error presents, that script is executed? But why then it would not save a file,...
I am not sure what do you mean by that,... I am sure that Qlik Sense could save file (I exported csv file), but I can't check if python has permissions because the it doesn't display any error. Terminal could save to file,..
Indeed, your attempt to write a file seems straightforward enough. What I meant by my request was to try to write to a global directory that is accessible to everyone (like C:\Temp)
If you start ProcessExplorer or Task Manager, do you see the python interpreter being launched when you run the load script? For a better chance of python.exe being visualized, add some code to your script that takes a while to complete, like a loop.