python-omniture icon indicating copy to clipboard operation
python-omniture copied to clipboard

Doesn't handle None Values

Open dancingcactus opened this issue 10 years ago • 0 comments

When there is a none value in the report it tries to interpret it as a NoneType instead of an actual value.

/Users/jgrover/projects/stats-learning/build/bdist.macosx-10.5-x86_64/egg/omniture/reports.py(132)parse_rows()

ipdb> row {u'url': u'', u'counts': [u'2', u'14'], u'name': None}

/Users/jgrover/anaconda/lib/python2.7/site-packages/omniture-0.4.4-py2.7.egg/omniture/reports.pyc in parse_rows(self, row, level, upperlevels) 130 data["datetime_friendly"] = str(row['name']) 131 else: --> 132 data[element] = row['name'].encode('utf-8') 133 #parse out any breakdowns and add to the data set 134 if row.has_key('breakdown') and len(row['breakdown']) > 0:

AttributeError: 'NoneType' object has no attribute 'encode'

dancingcactus avatar Jul 30 '15 17:07 dancingcactus