Michael Wang 5 Posted January 23, 2019 Share Posted January 23, 2019 I have Python Data functions successfully deployed and Ive written a very simple script to test its functionality. When I try to execute the data function, I am greeted by an alert that says the following: Could not execute function call. File not found: C:UsersusernameAppDataLocalTemptmpD6D6.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() Any idea why this is Thank you! Link to comment Share on other sites More sharing options...
Andreas Laestadius Posted January 27, 2019 Share Posted January 27, 2019 Hi, Without seeing your script I'm afraid it is very hard to comment. Have you tried to run the included samples Or perhaps the more involved tensor flow https://community.spotfire.com/wiki/anomaly-detection-using-tensorflow Link to comment Share on other sites More sharing options...
Michael Wang 5 Posted January 30, 2019 Author Share Posted January 30, 2019 Hi Andreas - I appreciate your reply. I've tried the example files as well and I get the same error. I've realized the issue has to do with how (where) I installed pandas and numpy. Per the manual, it states that: "The packages used in the python code must be manually installed in your Python environment before calling it in the user code." I've already added my runtime Python distribution to my PATH environment variable such that within Spotfire, it recognizes my Python version. How do I install numpy, pandas, and other packages in my Python environment I always have a lot of trouble getting the ball rolling and getting all the paths/environments set up correctly. Any help would be tremendously appreciated. Thank you. Link to comment Share on other sites More sharing options...
Andreas Laestadius Posted January 30, 2019 Share Posted January 30, 2019 Hi, If you are having issues with getting pandas, please look here: https://pandas.pydata.org/pandas-docs/stable/install.html Also a quick search gives these kind of further info: https://stackoverflow.com/questions/42907331/how-to-install-pandas-from-... Hope this helps and good luck! Link to comment Share on other sites More sharing options...
Michael Wang 5 Posted January 30, 2019 Author Share Posted January 30, 2019 Hi Andreas - I got all packages installed. It seems the issue had been a descrepancy in the version number of the packages corresponding to the version of Python. I no longer get that error message when executing the sample data functions. Instead, the error I receive now reads: Could not execute function call. Failed to create DataTable 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, Boolean& allDataRead) 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) Any idea what is causing the dataframes not to be generated Thank you. Link to comment Share on other sites More sharing options...
Michael Wang 5 Posted January 31, 2019 Author Share Posted January 31, 2019 Hi Andreas - I got everything to work. There seemed to be an issue with where pandas, numpy, and other packages were installed on my system. Thank you for your links and your help. You've been amazing! -Michael Link to comment Share on other sites More sharing options...
Mark Herrmann Posted July 22, 2019 Share Posted July 22, 2019 Hi,I am going through the exact same issues but cannot solve them. My packages are all installed and working correctly e.g. in spyder but still I get the File not found errorCould not execute function call 'Python Script DataFunction' File not found: C:UsersHER1DRAppDataLocalTemptmpF.stdfwhen running this simple script tryting to return moons as a data table:import sklearn.datasets as datamoons, _ = data.make_moons(n_samples=50, noise=0.05)As soon as I remove moons from the output variables list the script runs fine but obviously returns no data.Any ideas what could be the issueThanks, Mark Link to comment Share on other sites More sharing options...
Gonzalo Lopez Posted September 9, 2020 Share Posted September 9, 2020 Hello, We had the same problem on spotfire 10.2. The issue was a wrongly version combination of pandas and numpy. Pandas 0.25.3 and numpy 1.17.4 work fine together, Spotfire 10.10 use these versions as native implementation. It was difficult to find this solution. Link to comment Share on other sites More sharing options...
Preston Pope 2 Posted October 21, 2020 Share Posted October 21, 2020 You are a hero among men. Spent 3 hrs on various solutions. Setting my local panadas and numpy to those versions finally fixed it. Link to comment Share on other sites More sharing options...
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