sumehta / question-generation

Given a sentence automatically generate reading comprehension style factual questions from that sentence, such that the sentence contains answers to those questions.
MIT License
112 stars 31 forks source link

AttributeError: 'Namespace' object has no attribute 's' #13

Open enginpost opened 3 years ago

enginpost commented 3 years ago

I might be missing something simple. I am able to start up the java apps/servers and when I run the sample statement...

python question.py -s 'Handheld devices find ways to bolster U.S. homeland defense and response'

it returns the error I put in the title. Specifically, it references the error on line 15 of the question.py script. It is as if it cannot read the arguments. I am running Python version 3.8.9 and 3.9.4 using pyenv. I manually installed argparse via pip and it still throws the error.

sujitpal commented 2 years ago

I was able to solve this locally using the following.

replace args.s and args.t in question.py with args.sentence and args.question_type respectively, i.e. the long forms of the two arguments. Maybe the author has some setting that allows the code to resolve the short forms?