[pywin32-bugs] [ pywin32-Bugs-1571838 ] Error Message Missing
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2006-10-06 03:09:08
|
Bugs item #1571838, was opened at 2006-10-05 20:14 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1571838&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Open Resolution: None Priority: 5 Submitted By: Chris Gonnerman (solomoriah) Assigned to: Nobody/Anonymous (nobody) Summary: Error Message Missing Initial Comment: I'm running Win98 with Python 2.4.3, and I'm writing a module to generalize printing under Windows. I felt sure that one call wouldn't work on Win98, and sure enough it didn't: U:\Source\MSWinPrint>python mswinprint.py Traceback (most recent call last): File "mswinprint.py", line 252, in ? doc.begin_document() File "mswinprint.py", line 116, in begin_document devmode = win32print.GetPrinter(self.hprinter, 8)["pDevMode"] TypeError: GetPrinter() takes exactly 1 argument (2 given) But I realized I was running build 203, so I upgraded to build 209, and tried again: U:\Source\MSWinPrint>python mswinprint.py Traceback (most recent call last): File "mswinprint.py", line 252, in ? doc.begin_document() File "mswinprint.py", line 116, in begin_document devmode = win32print.GetPrinter(self.hprinter, 8)["pDevMode"] pywintypes.error: (0, 'GetPrinter', 'No error message is available') Now, I'm pretty sure the first version behavior is better than the second. ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2006-10-05 22:09 Message: Logged In: YES user_id=771074 In build 203, win32print.GetPrinter didn't accept an information level parm, alway using lvl 2. According to MSDN, on Win98 only 1,2 and 5 are valid levels for GetPrinter. Apparently the API function isn't setting an error code when passed a level that isn't supported on 98. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1571838&group_id=78018 |