bart hegarty Posted March 13, 2021 Share Posted March 13, 2021 Hello, I am getting a similar issue to a post i found here Python Data Function Temp File Not Found - Python Engine Version Change | TIBCO Community Though I am running a more recent version of Spotfire and the solution dose not seem to apply to my situation. Previously the post mentioned the following error being related to... "It was due to an Input Parameter that had not been referenced in the script. The file not found error occurs whenever there is a mismatch between the parameters defined in Edit Script and those used in Edit Parameters. Checking required parameter is a handy safeguard for this." -John.lyall I have went though the script and do not seem to find a mismatch. Please let me know if you need any other informationon this. Thanks is advance for the support! --------------Python Script ---------------- from Python_Data_Function import * # Put package imports here # Please make sure you have the correct packages installed in your Python environment from sklearn import preprocessing from sklearn.ensemble import IsolationForest import pandas as pd import numpy as np #Analysis using IsolationForest cols = ['ProdPerMinute', 'Pressure', 'BaroPressure', 'WasteGas', 'LossOfEfficiency', 'SR', 'PowerIn', '1dp', '2dp', '3dp', '4dp', '5dp', '6dp'] train = it[cols] scale = preprocessing.MinMaxScaler(feature_range=[0,1]) X_train = pd.DataFrame(scale.fit_transform(train),columns = train.columns) clf = IsolationForest(n_estimators=nEstimators, max_samples=MaxSamples,contamination=Contamination, bootstrap=True) clf.fit(X_train) it['Prediction'] = pd.DataFrame(clf.decision_function(X_train)) ot = it --------------ERROR MESSAGE----------- Could not execute function call 'PDF_IsolationForest' File not found: C:Users[username]AppDataLocalTemptmpB743.stdf at Spotfire.Dxp.Data.Import.FileDataSource..ctor(String filePath, String[] additionalFilePaths) at SpotfirePS.DataFunctions.Python.PythonDataFunctionExcecutor.d__4.MoveNext() at Spotfire.Dxp.Application.Extension.CustomDataFunctionExecutor.d__7.MoveNext() at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.d__8.MoveNext() 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