Statistica Python Node execution error: _ctypes.COMError: 'System call failed.'

Statistica Python Node execution error: _ctypes.COMError: 'System call failed.'

book

Article ID: KB0076719

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.3 and higher

Description

User has installed Python (e.g version 3.6.5), and installed "comtypes" python package (e.g. comtypes version 1.1.7) to integrate with Statistica by following this article
User has also added the the paths of the Python executables to Windows System Environmental Path variable (e.g. “C:\Python36;C:\Python36\Scripts").

User encounters below error when executing custom python node in Statistica workspace when routing output as downstream:

Traceback (most recent call last):
  File "C:\Users\srai\AppData\Local\Temp\tmpBBF7.py", line 905, in <module>
    RouteOutput(df,'Final',AsDownstream = True)
  File "C:\Users\srai\AppData\Local\Temp\tmpBBF7.py", line 795, in RouteOutput
    Application.StatusBar = ""
  File "C:\Users\srai\AppData\Local\Programs\Python\Python36\lib\site-packages\comtypes\__init__.py", line 292, in __setattr__
    value)
_ctypes.COMError: (-2147417856, 'System call failed.', (None, None, None, 0, None))

Environment

Windows

Resolution

A known cause of such "_ctypes.COMError: System call failed" error is that the python "comtypes" package installed in the user's system requires administrative privilege.  This requirement does not relate to Statistica application itself.

A workaround to resolve it is to launch Statistica as Administrator.

Issue/Introduction

Statistica Python Node execution error: _ctypes.COMError: 'System call failed.'