How to decipher error "Nonetype" Error

kbtyo ahlusar.ahluwalia at
Thu Sep 3 00:15:32 CEST 2015

I am currently using Jupyter and Pythopn 3.4. I am currently using the following script to parse and convert XML data structures, nested in a CSV - formatted file, convert into a dictionary and then append write it back into the same CSV. I am using the following (I added comments to explain the thought process):

However, when I hit line 40 (referencing the gist), I receive the following error:

TypeError                                 Traceback (most recent call last)
<ipython-input-56-4eff0a608e19> in <module>()
     23         # to ensure that the field names in the XML don't match (and override) the
     24         # field names already in the dictionary
---> 25         row.update(xml_data)
     26         # ensure that the headers have all the right fields
     27         headers.update(row.keys())

TypeError: 'NoneType' object is not iterable 

I can only infer I am passing or converting an empty key or empty row. I welcome feedback.

More information about the Python-list mailing list