Sign In/My Account | View Cart  
advertisement

Article:
 Decomposition, Process, Recomposition
Subject: Expatreader.py error (line 156)
Date: 2004-08-04 02:59:10
From: m breeb

My Python2.3 installation on win2000 has a little problem running the code. I'm getting a SAXNotSupportedException (expat does not report namespace prefixes). Any ideas what I'm missing here?

Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Expatreader.py error (line 156)
    2004-08-06 19:32:07 Uche Ogbuji [Reply]

    It turns out I got burned yet again by the differences between PySAX with and without PyXML installed. You can't set the namespace prefix feature in PySAX unless you have PyXML installed. I posted updated/fixed version of sax2dom_chunker.py in the Python Cookbook. Use that version rather than listing 2 here, and then omit the line


    parser.setFeature(sax.handler.feature_namespace_prefixes, 1)


    from your set-up code.


    Good luck.



Sponsored By: