Jump to content

Python Data Function (PyDF) failed to create DataTable


Mark Herrmann

Recommended Posts

Hi there,

I'm trying to include Python code running no problem in Spyder into a Spotfire analysis. It's a bit of a lengthy code but at the end of the day it produces two pandas DataFrames. The code itself runs fine also in Spotfire but as soon as I try to make one of the pandas DataFrames an output using the output handler "Data table" I get the following error:

Could not execute function call 'Python Script DataFunction'

Failed to create DataTable

at Spotfire.Dxp.Data.ColumnFactory.CreateColumns(DataRowReader reader, String documentTitle, IDataPropertyContainer properties, GlobalMethodRegistry globalMethodRegistry, CxxSession session, Boolean addNewProperties, PartialDataLoadReport report, Func`2 resultPropertiesCreator, UInt64 maxRowsToConsume)

at Spotfire.Dxp.Data.ColumnFactory.CreateColumns(DataRowReader reader, String documentTitle, IDataPropertyContainer properties, DataPropertyRegistry propertyRegistry, GlobalMethodRegistry globalMethodRegistry, CxxSession session, Boolean addNewProperties, PartialDataLoadReport report, ResultProperties resultProperties)

at Spotfire.Dxp.Data.DataFunctions.DataFunctionImpl.DataFunctionWorkItemState.Convert(DataRowReader reader, DataManager dataManager, Boolean mangleNames)

at Spotfire.Dxp.Data.DataFunctions.DataFunctionImpl.DataFunctionWorkItemState.GetOutputResults(Boolean withoutTransformations)

at Spotfire.Dxp.Data.DataFunctions.DataFunctionImpl.DataFunctionWorkItemState.c__DisplayClass81_0.b__1()

at Spotfire.Dxp.Framework.ApplicationModel.Progress.ExecuteSubtask(String title, ProgressOperation operation)

at Spotfire.Dxp.Data.DataFunctions.DataFunctionImpl.DataFunctionWorkItemState.ExecuteFunction(Boolean withoutTransformations)

I assume it is something very simple but could only find articles related to IronPyton but not to PyDF. An idea on what might be the issue would be highly appreciated!

I'm using Spotfire 10.3.1, Python 3.6.4 and we have SpotfirePS.DataFunctions.Python(Forms) 1.2.1.0 deployed.

Thanks,

Mark

Link to comment
Share on other sites

  • 4 weeks later...

Had a long WebEx with Tibco support yesterday and it turns out that in my case the problem was that the pandas dataframe contained one column of type int32. Deleting that column allows to create the table. I assuem changing it to int64 would as well since there are multiple other columns of type int64 creating no issues.

Tibco will update their SpotfirePS.DataFunctions.Python to deal with the issue.Thanks!

Mark

Link to comment
Share on other sites

I'm copy/pasting the answer again here for visibility

==

Had a long WebEx with Tibco support yesterday and it turns out that in my case the problem was that the pandas dataframe contained one column of type int32. Deleting that column allows to create the table. I assuem changing it to int64 would as well since there are multiple other columns of type int64 creating no issues.

 

Tibco will update their SpotfirePS.DataFunctions.Python to deal with the issue.

Thanks!

 

Mark

===

Link to comment
Share on other sites

  • 7 months later...

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...