Hi, I was following the codes in Getting Started with MAG.ipynb but encountered this error when the program was preprocessing the Publications. I was using the 2021-05-24 version of MAG and didn't change any things.
Could you help me with this problem?
KeyError Traceback (most recent call last)
<ipython-input-8-62f48396d725> in <module>
3
4 # we only need to run this for the first time, but it will take awhile
----> 5 mymag.preprocess()
/usr/local/lib/python3.6/site-packages/pyscisci/datasource/MAG.py in preprocess(self, dflist, show_progress)
64
65 if 'publication' in dflist:
---> 66 self.parse_publications(preprocess = True, show_progress=show_progress)
67
68 if 'reference' in dflist:
/usr/local/lib/python3.6/site-packages/pyscisci/datasource/MAG.py in parse_publications(self, preprocess, num_file_lines, preprocess_dicts, show_progress)
280 # split the line and keep only the relevant columns
281 sline = line.replace('\n', '').split('\t')
--> 282 pline = [load_int(sline[ip]) for ip in pub_int_columns] + [sline[ip] for ip in pub_str_columns] + [doctype[sline[3]]]
283 pub2year[pline[0]] = pline[1]
284 if doctype[sline[3]] != '':
KeyError: 'Thesis'
Hi, I was following the codes in
Getting Started with MAG.ipynb
but encountered this error when the program was preprocessing thePublications
. I was using the 2021-05-24 version of MAG and didn't change any things.Could you help me with this problem?