]> code.communitydata.science - covid19.git/blobdiff - transliterations/src/wikidata_search.py
adding a logs dir without adding my log files, assuming those don't
[covid19.git] / transliterations / src / wikidata_search.py
index 21e8598a2045f3cbdafb09bef848ff57adcd0116..a3abbc0d800732298cc6481261dc967945586a18 100644 (file)
@@ -68,12 +68,12 @@ def read_google_trends_files(terms_files):
 
 
 def trawl_google_trends(terms_files, outfile = None, mode='w'):
-    terms = read_google_trends_files(terms_files)
+    terms = list(read_google_trends_files(terms_files))
     resultset = run_wikidata_searches(terms)
     resultset.to_csv(outfile, mode)
 
 def trawl_base_terms(infiles, outfile = None, mode='w'):
-    terms = chain(* (open(infile,'r') for infile in infiles))
+    terms = list(chain(* (open(infile,'r') for infile in infiles)))
     resultset = run_wikidata_searches(terms)
     resultset.to_csv(outfile, mode)
 

Community Data Science Collective || Want to submit a patch?