Jump to content

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


Paul See

Recommended Posts

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:

Codes:

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

Error:

File not found: C:UsersAppDataLocalTemptmp1A64.stdf

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

at SpotfirePS.DataFunctions.Python.PythonDataFunctionExcecutor.d__2.MoveNext()

at Spotfire.Dxp.Application.Extension.CustomDataFunctionExecutor.d__5.MoveNext()

at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.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.

 

Best,

Paul

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...
  • 1 month later...

Any update on this I have the same issue. All works fine when I use Anaconda 2.7.16, but when using Anaconda 3.7.6 I get the same "File not found" error:

 

2020-05-28_14-59-01_1.png

 

As can be seen in the image above there is actually a stdf file created at the same time (tmpFC34.stdf) but Spotfire looks for another file tmpFC32.stdf that only exists as tmpFC32.tmp file.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...