我从 optparse 更改为 argparse 但是当我尝试运行它时,我收到以下错误:
if not option_string[0] in self.prefix_chars:
IndexError: string index out of range
我的代码是:
usage = "%prog -f <fasta TFs> -a <database all> -s <database small> -d <pfam database> [options]"
version = "1.0.1"
description = " "
epilog = " "\
" "
parser = argparse.ArgumentParser(usage=usage, description=description,
version="%prog "+version, epilog=epilog)
# options for running the program
# TF file
parser.add_argument("-f", "", dest="TF", metavar="<file>",
help="input file with transcription factors")
parser.set_defaults(fasta=None)
我找不到这个错误来自哪里,如何解决这个问题?