handling ExpatError exception raised from ElementTree.XML() method
mirandacascade at yahoo.com
mirandacascade at yahoo.com
Fri Oct 28 00:02:00 EDT 2005
Mr. Boddie's suggestions work as indicated...many thanks.
It's not clear how a grep of the site-packages directory revealed the
most likely location of the ExpatError class is xml.parsers.expat.
Using XP's search utility, I searched for any files within the
c:\python24\ folder structure that had 'ExpatError' somewhere in the
file (I specified a case sensitive search.) That search found nothing.
I modified the search to look for any files with 'expat' (not case
sensitive.)...it located the file Mr. Boddie
mentioned...\lib\xml\parsers\expat.py. That file has only a few lines
of code...it appears to import all the objects from what I'm guessing
is the pyexpat extension module. I'm guessing that ExpatError is
embedded within that extension module...is that a correct guess?
It's not clear how Mr. Boddie was able to surmise where ExpatError
resides given that a case sensitive search of the folder structure
didn't find any files containing 'ExpatError'.
More information about the Python-list
mailing list