[XML-SIG] [ pyxml-Bugs-1096906 ] SAX2 wrecks marshal.generic

SourceForge.net noreply at sourceforge.net
Thu Jan 6 03:27:35 CET 2005


Bugs item #1096906, was opened at 2005-01-05 18:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1096906&group_id=6473

Category: SAX
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: James S (laskovortex)
Assigned to: Nobody/Anonymous (nobody)
Summary: SAX2 wrecks marshal.generic

Initial Comment:
Using PyXML-0.8.4, mandrake linux 10.1 and python 2.3.4

Not sure what is happening, but

if this is the xml file (called "eraseme.prefs"):

<?xml version='1.0' encoding='UTF-8'?>
<marshal>
  <dictionary id='i2'>
    <string>color</string>
    <string>blue</string>
    <string>max</string>
    <int>3</int>
    <string>min</string>
    <int>0</int>
  </dictionary>
</marshal>


Then the following code does not work:

---

#! /usr/bin/env python
from xml.marshal import generic
from xml.dom.ext.reader import Sax2

Sax2.Reader()

print generic.load(open("eraseme.prefs"))

---

However, the following code works fine:

#! /usr/bin/env python
from xml.marshal import generic
from xml.dom.ext.reader import Sax

Sax.Reader()

print generic.load(open("eraseme.prefs"))

---

The error messages follow follow

Traceback (most recent call last):
  File "./test.py", line 7, in ?
    print generic.load(open("eraseme.prefs"))
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/marshal/generic.py",
line 312, in load
    return m._load(file)
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/marshal/generic.py",
line 329, in _load
    p = saxexts.make_parser()
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/sax/saxexts.py",
line 168, in make_parser
    return XMLParserFactory.make_parser(parser_list)
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/sax/saxexts.py",
line 64, in make_parser
    return self._create_parser(parser_name)
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/sax/saxexts.py",
line 43, in _create_parser
    return drv_module.create_parser()
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/sax/drivers/drv_pyexpat.py",
line 228, in create_parser
    return SAX_expat()
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/sax/drivers/drv_pyexpat.py",
line 31, in __init__
    self.reset()
  File
"/data1/users/jstroud/Programs/lib/python2.3/site-packages/_xmlplus/sax/drivers/drv_pyexpat.py",
line 117, in reset
    self.parser=expat.ParserCreate()
AttributeError: 'module' object has no attribute
'ParserCreate'


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=1096906&group_id=6473


More information about the XML-SIG mailing list