Message12325
Platform: windows 2000 SP2 (Pl)
Python version: Python 2.2 (#28, Dec 21 2001,
12:21:22) [MSC 32 bit (Intel)] on win32
I have noticed strange problem while using the xml.sax
module. When I run my application using python.exe
everything is working fine, the error occures only when I
try to execute my script using pythonw.exe.
The problematic code looks approximately like this (It's
a PyQT based application btw):
parser = xml.sax.make_parser()
handler = MyAppDocumentHandler()
parser.setContentHandler(handler)
try:
self.parser.parse(fileName)
except IOError:
QMessageBox.information(None,"MyApp","Sorry,
problems occured while loading:\n"+fileName+"\n\nIO
error:\n"+str(sys.exc_info()[1]))
return FALSE
except:
print "Unhandled exception:", sys.exc_info()[0]
QMessageBox.information(None,"MyApp","Sorry,
problems occured while
loading:\n"+fileName+"\n\nParser error:\n"+str
(sys.exc_info()[0]))
return FALSE
The first time when I open the file everything works ok,
the file is parsed, but when I try to open another file I
catch the IOError [Errno 9] Bad file descriptor error. (The
file location and everything else is ok.)
Greetings
Adam Widera
PS: If You have more questions about the bug or have
problems with trigging the bug out get me know. My e-
mail: adamwidera@wp.pl
|
|
| Date |
User |
Action |
Args |
| 2007-08-23 14:05:40 | admin | link | issue606692 messages |
| 2007-08-23 14:05:40 | admin | create | |
|