Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Running pssexcel.accc method from multiple processors simultaneously

Has anyone been able to convert multiple acc files to excel files simultaneously using the python multiprocessing package. The following python exception is raised when I try to do so.

com_error: (-2147352567,'Exception occurred.', (0, u'Microsoft Excel', u'Select method of Range class failed', u'xlmain11.chm', 0, -2146827284), None)

This exception is output by at least 2 of the 3 processors running. I am assuming that the processors are interfering with each other. If I run the same program for one acc file, then the acc to excel file conversion works fine.

This program is able to successfully run the psspy.accc method on three cases at the same time. The following function is called by each processor after it finishes the accc run. This is when the exception occurs.

alt text

Running pssexcel.accc method from multiple processors simultaneously

Has anyone been able to convert multiple acc files to excel files simultaneously using the python multiprocessing package. The following python exception is raised when I try to do so.

com_error: (-2147352567,'Exception occurred.', (0, u'Microsoft Excel', u'Select method of Range class failed', u'xlmain11.chm', 0, -2146827284), None)

This exception is output by at least 2 of the 3 processors running. I am assuming that the processors are interfering with each other. If I run the same program for one acc file, then the acc to excel file conversion works fine.

This program is able to successfully run the psspy.accc method on three cases at the same time. The following function is called by each processor after it finishes the accc run. This is when the exception occurs.

alt text


def accc_to_excel(self):
    pssexcel.accc(self.acc,self.string,colabel='',stype='contingency',
        busmsm=0.5,sysmsm=5.0,rating=self.baseRat,namesplit=True,xlsfile=self.excelf,
        sheet='',overwritesheet=True,show=False,ratecon=self.contRat,baseflowvio=True,
        basevoltvio=True,flowlimit=self.flowPerc,flowchange=0.0,voltchange=0.0)
    testxls = excelpy.workbook(self.excelf)
    testxls.close()
    self.result_queue.put('1')