[XML-SIG] Assistant trouble shooting 'ImportError: No module named dom.ext.reader'

Hardison Leif Leif.Hardison at comverse.com
Fri Aug 19 15:49:08 CEST 2005

Thanks for the suggestion Tim.

Right now, I'm evaluating my different options for working with this XML
file using Python.  I'm excited because the project gives me one of
those legit excuses to spend more time learning a language I've always
wanted to spend time with.


Leif Hardison
>Data Center Engineer
+1 781 223 6754 (mobile)

-----Original Message-----
From: Tim Hoffman [mailto:timh at zute.net] 
Sent: Thursday, August 18, 2005 6:58 PM
To: Hardison Leif
Cc: xml-sig at python.org
Subject: Re: [XML-SIG] Assistant trouble shooting 'ImportError: No
module named dom.ext.reader'

Maybe you should look at ElementTree or more specifically cElementTree,
Thiough it does have a different api/model


Hardison Leif wrote:

>Fred, indeed that looks to be the problem...  The script runs now; 
>however it takes forever to parse the input file.  Does anyone happen 
>to have any generalized benchmarks on the performance one could expect 
>from PyXML?
>The XML data files I'm working on currently are around 100MB in size 
>and grow approximately 20MB per month if not more.
>Leif Hardison
>>Data Center Engineer
>-----Original Message-----
>From: Fred L. Drake, Jr. [mailto:fdrake at acm.org]
>Sent: Thursday, August 18, 2005 9:57 AM
>To: xml-sig at python.org
>Cc: Hardison Leif
>Subject: Re: [XML-SIG] Assistant trouble shooting 'ImportError: No 
>module named dom.ext.reader'
>On Tuesday 16 August 2005 14:09, Hardison Leif wrote:
> > The error I'm receiving when running an example file is:
> >
> > my-host:/home/.../scripts# /usr/local/bin/python xml2.py  > 
> > Traceback
>(most recent call last):
> >   File "xml2.py", line 2, in ?
> >     from xml.dom.ext.reader import Sax2
> >   File "/home/.../scripts/xml.py", line 1, in ?
> >     from xml.dom.ext.reader import Sax2
> > ImportError: No module named dom.ext.reader
>It looks like you have a file "xml.py" on your sys.path before the 
>PyXML installation or the standard library.  Is there an "xml.py" in 
>the same directory as your xml2.py script?
>  -Fred

  This email message has been scanned by PineApp Mail-Secure and has
been found clean.

More information about the XML-SIG mailing list