You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a function in a file which parses arguments:
def get_args():
#Set up parser and top level args
parser = argparse.ArgumentParser(description='ASCENT: Automated Simulations to Characterize Electrical Nerve Thresholds')
parser.add_argument('run_indices', nargs = '+', help = 'Space separated indices to submit NEURON sims for')
parser.add_argument('-p','--partition', help = 'If submitting on a cluster, overrides default partition assignment')
args = parser.parse_args()
return args
This file is not part of a module, therefore I am using the filename to point to the function:
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/ascent-docs/envs/latest/lib/python3.7/site-packages/sphinxarg/ext.py", line 476, in run
func = mod[attr_name]
KeyError: 'parser'
I am assuming since it is contained within a function, sphinx-argparse cannot find the parser object. How can I point to the parser within the function get_args()?
Thanks!
The text was updated successfully, but these errors were encountered:
I have a function in a file which parses arguments:
This file is not part of a module, therefore I am using the filename to point to the function:
This results in the following error:
I am assuming since it is contained within a function, sphinx-argparse cannot find the parser object. How can I point to the parser within the function get_args()?
Thanks!
The text was updated successfully, but these errors were encountered: