Skip to content

VisIt doesn't handle the case where scripts have arguments named the same as VisIt arguments #19616

@JustinPrivitera

Description

@JustinPrivitera

Taken from a conversation with a user:

#!/usr/bin/env python3
import argparse
import visit # type: ignore

def cli_args() -> argparse.Namespace:
    parser = argparse.ArgumentParser()
    parser.add_argument('-nn', type=int)
    #parser.add_argument('-nodes', type=int)
    return parser.parse_args(visit.Argv())

def main():
    print(cli_args())

main()
exit()

so if you do visit -nowin -cli -s test.py -nn 1 you'll get an error but if you comment out the -nn and uncomment the -nodes in cli_args and then run visit -nowin -cli -s test.py -nodes 1 then it works

What are our thoughts on this? Should we support this case? At the very least it's a pitfall users can run into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingimpact mediumProductivity partially degraded (not easily mitigated bug) or improved (enhancement)likelihood mediumNeither low nor high likelihoodreviewedIssue has been reviewed and labeled by a developer

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions