question-generation
question-generation copied to clipboard
AttributeError: 'Namespace' object has no attribute 's'
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.
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?