[pywin32-bugs] [ pywin32-Bugs-785258 ] Recent breakage in VBComponents
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2003-08-09 13:09:05
|
Bugs item #785258, was opened at 2003-08-08 09:01 Message generated for change (Comment added) made by comcol You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=785258&group_id=78018 Category: None Group: None Status: Open >Resolution: Invalid Priority: 5 Submitted By: Mark Carter (comcol) Assigned to: Nobody/Anonymous (nobody) Summary: Recent breakage in VBComponents Initial Comment: I use Office 2000, Windows 98, and I have recently upgraded to python 2.3 and win32all-155.exe The following code worked in python 2.2 under an old pywin32: xlApp = Dispatch("Excel.Application") xlApp.Visible = 1 xlApp.Workbooks.Add() xlApp.ActiveWorkbook.SaveAs(sys.path[0] + '\temp.xls') wb = xlApp.Workbooks("temp.xls") wbc = wb.VBProject.VBComponents # <---- CAUSES CRASH IN 2.3 xlApp.Quit() del xlApp but I get a GPE in 2.3, when the code finishes execution: EXCEL caused an invalid page fault in module OLE32.DLL at 0167:65f18ae3. If you comment out the line wbc = ... then I get no GPE. ---------------------------------------------------------------------- >Comment By: Mark Carter (comcol) Date: 2003-08-09 13:09 Message: Logged In: YES user_id=478116 Response by mhammond: I think this is a bug in Excel, but it is not clear why Python 2.3 shows it, but 2.2 does not. If you set wbc to None before closing, it doesn't crash. I think the problem is that Excel doesn't like being shut down when references to it still exist. You should try and make sure that pythoncom._GetInterfaceCount() returns zero before quitting ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=785258&group_id=78018 |