Hello there, Based on the VBS script generated when we choose the "Schedule" option on EnterpriseGuide our team is trying to automate the exeuction os SAS programs on Python by using PyWin32/win32com. In my colleague's computer it runs fine, but in mine, I get this error: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\win32com\client\dynamic.py", line 89, in _GetGoodDispatch
IDispatch = pythoncom.connect(IDispatch)
pywintypes.com_error: (-2147221021, 'Operation unavailable', None, None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\xxxxxxx\Desktop\test.py", line 4, in <module>
sas = EnsureDispatch('SASEGObjectModel.Application.7.1')
File "C:\ProgramData\Anaconda3\lib\site-packages\win32com\client\gencache.py", line 527, in EnsureDispatch
disp = win32com.client.Dispatch(prog_id)
File "C:\ProgramData\Anaconda3\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\ProgramData\Anaconda3\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\ProgramData\Anaconda3\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147024809, 'The parameter is incorrect.', None, None) When I've tried using makepy to generate a py model of the object, I've got this message: Could not locate a type library matching 'SASEGObjectModel.Application.7.1' But by using this simple VBS script: Set app = CreateObject("SASEGObjectModel.Application.7.1")
WScript.echo app.Name i'm able to see a message box with "Enterprise Guide" written on it. So it seems the COM object is correctly registered on my system. I would be glad for any kind of help 😃
... View more