Open IgorGoldenberg opened 4 years ago
I'm having a similar issue. I have these lines of code which cause the issue, which is the same error that is thrown inside the automation.py file. Did you ever find a solution?
beta_data = np.array([[0.1,2.33,1.],[0.65,5.22,1.],[0.88,8.234,1.]])
varr = np.zeros(beta_data.shape, npsupport.VARIANT_dtype, order='F')
varr.flat = [VARIANT(v) for v in beta_data.flat]
I was trying to pass 2D VARIANT array to a COM object, but it was always passed as one dimensional array Then I tried to pass ndarray, but was getting type conversion error. Then I tried to create 2D VARIANT array directly using the code below.
It fails in safearray.py at line 380: varr.flat = [VARIANT(v) for v in value.flat]
it's a part of the function :
Python version 3.7.7 COMTypes version 1.1.7