nickesk / pyactiveresource

Automatically exported from code.google.com/p/pyactiveresource
Other
0 stars 0 forks source link

util.xml_to_dict fails if give a array type as xml #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I using this module to work with api rest from Redmine, if redmine give me 
an error xml as this

<?xml version="1.0" encoding="UTF-8"?><errors type="array"><error>Actividad no 
puede estar en blanco</error></errors>

And try parse xml to dict give me this Exception

File 
"/usr/local/lib/python2.7/dist-packages/pyactiveresource-1.0.2-py2.7.egg/pyactiv
eresource/activeresource.py", line 89, in from_xml
    xml_string)['errors']['error']
TypeError: list indices must be integers, not str

Original issue reported on code.google.com by dam...@emergya.com on 26 Jul 2013 at 5:29