cligs/pyzeta

KeyError: "None of ['idno'] are in the columns"

Closed this issue · 3 comments

I tried running run_pyzeta with doyle and roman20 corpus and I get this error:

Traceback (most recent call last):
  File "run_pyzeta.py", line 101, in <module>
    calculate.main(datafolder, dtmfolder, metadatafile, separator, contrast, logaddition, resultsfolder, segmentlength, featuretype, absolutefreqs, relativefreqs, binaryfreqs)
  File "/Users/reiterns/Documents/Projects/fanfiction/pyzeta/scripts/calculate.py", line 375, in main
    idlists = make_idlists(metadatafile, separator, contrast)
  File "/Users/reiterns/Documents/Projects/fanfiction/pyzeta/scripts/calculate.py", line 36, in make_idlists
    metadata.set_index("idno", inplace=True)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/frame.py", line 4391, in set_index
    raise KeyError("None of {} are in the columns".format(missing))
KeyError: "None of ['idno'] are in the columns"

Any ideas?

Hi there! Somehow I missed this issue. Will look into it. Thanks for testing and reporting. C.

It may have to do with the separator character used in the metadata file. It has to be specified in the "separator" parameter in "run_pyzeta.py" (line 97 in the current version). Probably something I should make more forgiving / flexible.

Yes, that did the trick. Thanks!