xml_pickle load problem

Markus von Ehr vonehr at ipm.fhg.de
Mon Jul 26 04:25:12 EDT 2004


Hi everybody,

I use xml_pickle to write xml files.
Trying to load them with:

                     xml_str = f.read()
                     xml_pickle.MyClass = MyClass
                     obj = xml_pickle.XML_Pickler().loads(xml_str))
                     f.close()

ends with an error:

Traceback (most recent call last):
   File "C:\Programme\Python23\wxOSP_geht\xml_pickle.py", line 587, in ?
     t = o.loads(s)
   File "C:\Programme\Python23\wxOSP_geht\xml_pickle.py", line 224, in loads
     obj = self.load(fh)
   File "C:\Programme\Python23\wxOSP_geht\xml_pickle.py", line 198, in load
     return thing_from_dom(parse_string)
   File "C:\Programme\Python23\wxOSP_geht\xml_pickle.py", line 242, in 
thing_from_dom
     id = node.attributes[('', 'id')].value
TypeError: unsubscriptable object


Anybody knows how to get rid of the error?
Thanks for any hints,

Markus



More information about the Python-list mailing list