Python Data Function (PyDf) - Error in Executing Function Call

Hi TIBCO Community,


I am facing challenges in running python scripts within the Spotfire Platform. I have installed and uploaded the 2 .spk files associated to the PyDf in my Development Area:

  • SpotfirePS.DataFunctions.Python*.spk
  • SpotfirePS.DataFunctions.PythonForms.*.spk


I have also added my python executable file in my PATH environment variable and all relevant modules (numpy, pandas, etc) were installed in the python environment seperately beforehand. As far as I am concerned, I have followed all the installation guidelines.


However, unfortunately, when running some scripts from the Spotfire Platform using PyDf, I am facing the following error:


from Python_Data_Function import *

import numpy as np

import pandas as pd

df = it

cols = df.columns

names = cols

where, it = input data table

            names = outut data table


File not found: C:\Users\AppData\Local\Temp\tmp1A64.stdf

   at Spotfire.Dxp.Data.Import.FileDataSource..ctor(String filePath, String[] additionalFilePaths)

   at SpotfirePS.DataFunctions.Python.PythonDataFunctionExcecutor.<ExecuteFunctionCore>d__2.MoveNext()

   at Spotfire.Dxp.Application.Extension.CustomDataFunctionExecutor.<Spotfire-Dxp-Data-DataFunctions-IFunctionExecutor-ExecuteFunction>d__5.MoveNext()

   at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__3.MoveNext()


I do not see any import error, thus I do not believe there is any problem with my python environment and its associated modules.

I have also checked other similar posts on this error, however, none of the solutions worked for me.

I would really appreciate any help in resolving this issue.