xml_pickle load problem

Discussion in 'Python' started by Markus von Ehr, Jul 26, 2004.

  1. 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
    Markus von Ehr, Jul 26, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mad Scientist Jr
    Replies:
    7
    Views:
    1,158
    Emma Gumbdough
    Jun 30, 2004
  2. venky

    Page Load and webcontrol page load

    venky, Jul 6, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    3,095
    venky
    Jul 11, 2005
  3. roni
    Replies:
    1
    Views:
    647
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tp?=
    Aug 30, 2005
  4. Dan

    RE: xml_pickle load problem

    Dan, Jul 26, 2004, in forum: Python
    Replies:
    2
    Views:
    293
    David Mertz, Ph.D.
    Jul 30, 2004
  5. David Shen

    Problem with xml.load & xsl.load in JSP

    David Shen, Aug 28, 2003, in forum: Javascript
    Replies:
    0
    Views:
    115
    David Shen
    Aug 28, 2003
Loading...

Share This Page