Background:
The Spotfire Analyst client application contains a dialog box to manage Python packages so that scripting in analysis files can use these Python functions. The dialog box is accessed via the Analyst menu item: Tools > Python Tools. Over the course of time, the versions of these Python packages become outdated and, therefore, they may need to be manually updated.
One method of getting the latest packages is to use the 'Upgrade' button in this dialog box, which is the focus of this article. See the following article for a complete review: Using Python packages in Spotfire - Spotfire - Spotfire Community
Another approach is from the command prompt, covered in this article: Navigating and Managing Python Packages – Revvity Signals
Details:
When selecting each Python package in Python Tools and then clicking 'Upgrade', sometimes the package does not actually update to the latest version as expected, particularly the Spotfire package. You might get a generic message such as "Could not execute function call '<function name>'" when package versions become incompatible. Python Tools displays the version of each Python package, which you can compare to the latest version that happens to be available currently. If these versions differ after you have clicked 'Upgrade' , then try the below Solution. This is the line-item display of the broken state in Python Tools: " spotfire (2.1.2)[2.3.0 available] "
Such broken state may manifest as the following error log content:
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
at Spotfire.Dxp.Data.DataFunctions.Executors.LocalPythonFunctionClient.<RunFunction>d__8.MoveNext()
at Spotfire.Dxp.Data.DataFunctions.Executors.PythonScriptExecutor.<ExecuteFunction>d__9.MoveNext()
at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__8.MoveNext()
Solution:
To resolve this issue, try navigating to the installation location of the Spotfire Analyst client's "Modules" folders, and then delete the folder of the Python package that is not updating, for example:
C:\Users\<username>\AppData\Local\Spotfire\14.0.5\Modules\Python Interpreter_3.1109.20102.16\python\spotfire-packages\spotfire-2.1.2.dist-info
(note, "Modules" folder is a hidden Windows folder, see the article link in References section below for more info on how to access it)
Alternatively, as noted in the above Revvity Signals article, try uninstalling the package from a command line.
Next, select the package in Python Tools and then click 'Upgrade' again. This is the display of the fixed state: " spotfire (2.3.0) ".
References:
The following article will help you access the Modules folder, if needed: Finding the Modules Folder in Spotfire Analyst Client for Package Building – Revvity Signals
Comments
0 comments
Article is closed for comments.