Luke George Posted April 1, 2020 Posted April 1, 2020 I am trying to get python data functions working in my dashboard. I've followed the instructions as per this link:https://community.spotfire.com/wiki/python-data-function-tibco-spotfire When I run a function, I can import modules without error, I can write some simple code and run without error, I can even have input parameters in my code without error. But as soon as I set anoutput parameter,i get the following error: Could not execute function call 'Python Script DataFunction' File not found: C:Usersluke.georgeAppDataLocalTemptmpBE84.stdf I have seen the solution posted here:https://community.spotfire.com/questions/python-data-function-temp-file-not-found-python-engine-version-change, but this does not fix my problem.
Shashank Gurnalkar Posted April 1, 2020 Posted April 1, 2020 If you can share your DXP file (with embedded data), I can take a look into your script. Also, brief about what exactly you are trying with the script.
Luke George Posted April 1, 2020 Author Posted April 1, 2020 Hi Shashank, I've attached an example DXP with a simple data function where I'm just trying to multiply a column by two.
Shashank Gurnalkar Posted April 2, 2020 Posted April 2, 2020 It looks like you are using a custom extension of Python Data Function and not the native Python Data Function (available from 10.7 and onwards). Since I do not have the custom extension, I won't be able to test this with it. With native PyDF, I was able to create a column which is twice of an existing column. Create a simple script as shown above, and assign the input x to a type column and data type 'Integer'. If the column is of 'Real' data type, give it a Real data type. Don't give it multiple data types. I see that you have given multiple data types to your input parameter. After that, assign the output to a type column. In Edit parameters, check the 'Refresh function automatically' checkbox. In Input >> Input Handlers, select 'Columns' and select the column you want to multiply.In Output >>Output Handlers, select 'Columns' and click OK.
Luke George Posted April 8, 2020 Author Posted April 8, 2020 The reason I'm using the custom python extension and not a native python data function is because I want to see if I can use the python exytension to implement a work around to run python in the web player...but at this stage I can't even get it working in Analyst!
Karan Nisar Posted April 20, 2020 Posted April 20, 2020 I tried running the script with custom extension of Python Data Function and I was able to run it and achieve the desired output. Ensure that your input and output values defined have the same data types.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now