I have a python script that creates and opens an EAP file using the Enterprise Architect's COM interface.
The script works if I launch it from the command line, or through a scheduled task. The strange thing is that it fails with an exception when I start the script from Jenkins.
The same user is used in all three cases; I was able to confirm this using the Windows TaskManager.
here is the script:
filename = 'C:\\temp\\out.eap'
import win32com.client
try:
win32com.client.gencache.EnsureModule('{64FB2BF4-9EFA-11D2-8307-C45586000000}', 0, 2, 10)
repository = win32com.client.Dispatch('EA.Repository')
print 'creating file'
repository.CreateModel(win32com.client.constants.cmEAPFromBase, filename, 0)
print 'opening file'
repository.OpenFile(filename)
print 'opened file'
repository.CloseFile()
except Exception, e:
print e
finally:
repository = None
This is the output on Jenkins' console:
creating file
opening file
(-2147417851, 'The server threw an exception.', None, None)
The file C:\temp\out.eap was created, and can be opened by clicking on it.
EA version is 10.0.1009
Does anybody have an idea about where to start looking?
Thanks in advance,
Henk