Running pssexcel.accc method from multiple processors simultaneously

asked 2014-03-27 11:35:37 -0600

anonymous user

Anonymous

updated 2014-03-27 11:44:20 -0600

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.


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')
edit retag flag offensive close merge delete