I get an error (below) when trying to use a python code including numpy. Is
win32 somehow incompatible with numpy? I would appreciate any information
you can provide regarding this issue.
I only get the error if I import any function from numpy!
Minimal example:
import win32com.server.register
import pythoncom
from numpy import mean
class TimeSeriesManipulation:
_public_methods_ = [ 'SplitString']
_reg_progid_ = "PythonUtils.NumpyError"
_reg_clsid_ = "{08A4D1F8-0185-4692-BE40-4AD081DB90B1}"
def SplitString(self, val, item=None):
from string import split
if item != None: item = str(item)
return split(str(val), item)
if __name__=='__main__':
print "Registering COM server..."
import win32com.server.register
win32com.server.register.UseCommandLine(TimeSeriesManipulation)
Sub tt()
Set PythonUtils = CreateObject("PythonUtils.NumpyError")
response = PythonUtils.SplitString("Hello from VB")
For Each Item In response
MsgBox Item
Next
End Sub
I get a run-time error ' -21474677259(80004005)':
Unexpected Python Error: Traceback (most recent call last):
File "C:\appl\python26\lib\site-packages\win32com\server\policy.py",
line 136 in CreateInstance
return retObj._CreateInstance_(clsid, reqIID)
File "C:\appl\python26\lib\site-packages\win32com\server\policy.py",
line 194, in _CreateInstance_
mvob = call func(classSpec)
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32