--- a/script/lib/iri_tweet/utils.py Sun Jan 30 22:10:59 2011 +0100
+++ b/script/lib/iri_tweet/utils.py Mon Jan 31 06:52:18 2011 +0100
@@ -36,6 +36,8 @@
ts = email.utils.parsedate_tz(date_str)
return datetime.datetime(*ts[0:7])
+def clean_keys(dict_val):
+ return dict([(str(key),value) for key,value in dict_val.items()])
fields_adapter = {
'stream': {
@@ -143,7 +145,9 @@
def __process_entity(self, ind, ind_type):
logging.debug("Process_entity : " + repr(ind) + " : " + repr(ind_type))
-
+
+ ind = clean_keys(ind)
+
entity_dict = {
"indice_start": ind["indices"][0],
"indice_end" : ind["indices"][1],