Bugs item #606692, was opened at 2002-09-09 09:36 Message generated for change (Comment added) made by facundobatista You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=606692&group_id=5470
Category: XML Group: Python 2.2 >Status: Closed >Resolution: Wont Fix Priority: 5 Submitted By: Adam Widera (adamwidera) Assigned to: Nobody/Anonymous (nobody) Summary: xml.sax second time file loading problem Initial Comment: 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: [EMAIL PROTECTED] ---------------------------------------------------------------------- Comment By: Facundo Batista (facundobatista) Date: 2005-03-21 15:32 Message: Logged In: YES user_id=752496 Deprecated. Reopen only if still happens in 2.3 or newer. . Facundo ---------------------------------------------------------------------- Comment By: Facundo Batista (facundobatista) Date: 2004-11-15 21:38 Message: Logged In: YES user_id=752496 Please, could you verify if this problem persists in Python 2.3.4 or 2.4? If yes, in which version? Can you provide a test case? If the problem is solved, from which version? Note that if you fail to answer in one month, I'll close this bug as "Won't fix". Thank you! . Facundo ---------------------------------------------------------------------- Comment By: Adam Widera (adamwidera) Date: 2002-09-12 14:23 Message: Logged In: YES user_id=608362 Hi Martin No. I'm affraid no. It happens even if it is the only one and the first application that is running on the system (except background ones). It is verry unpredictible, I have tested it once again and I have noticed that the smaller and verry simple xml files (2k) were loading without problems and the the error occured only while loading the bigger ones (37k). At the same time yesterday the problem occured while loading smaller files too. Maybe it is a memory management problem? Greetings Adam Widera ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2002-09-11 13:37 Message: Logged In: YES user_id=21627 Is there any chance that when you run the application the second time, that the first instance is still around? Please use the process viewer to find out whether there are any remaining Python processes - this could be a sharing violation. ---------------------------------------------------------------------- Comment By: Adam Widera (adamwidera) Date: 2002-09-09 10:07 Message: Logged In: YES user_id=608362 Platform: windows 2000 SP2 (Pl) Python version: Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32 Correction to the previous bug message: the 5'th line of the example should of course look like this: parser.parse(fileName) not self.parser.parse(fileName) The bug is still actual (the literal mistake took place only in the bug report message) Greetings Adam Widera ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=606692&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com