xml_pickle load problem

M

Markus von Ehr

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top