Have I broken my installation?

Martin v. Löwis martin at v.loewis.de
Sat Jun 28 11:53:52 EDT 2003


Matt Mower <mmower at novissio.com> writes:

> Googling around it seems like I needed to build XML support when I
> built Python.  I'm not sure what I should have done differently when I
> built in order to make that happen.  

You should have edited Modules/Setup, to activate pyexpat. Before
that, you probably should have installed a more recent Expat version
than the one shipped with Redhat.

> Now instead of the previous error I get a different problem entirely:
> 
> >Traceback (most recent call last):
> >  File "/mnt/hugedisk/share/MattsMovableType/stb/stb.cgi", line 18, in ?
> >    from xml.dom.minidom import parse, Document
> >  File "./xml.py", line 2, in ?
> >    from xml.dom.minidom import parse
> >ImportError: No module named dom.minidom
> 
> I'm pretty sure I had a module dom.minidom before as it is the import
> statement that is raising the exception and it didn't prior to
> installing PyXML, I was previously calling parse() and Document().
> 
> So did I make a mistake installing PyXML? 

This is uncertain. Does this also happen when you invoke Python from
the command line? If so, what happens if you do

import xml
print xml
import xml.dom
print xml.dom
import xml.dom.minidom
print xml.dom.minidom

If not, what happens if you do the same in the CGI script?

Regards,
Martin




More information about the Python-list mailing list