Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main() is not called with arguments and does not need arguments. #24

Closed
hansendx opened this issue Aug 22, 2019 · 0 comments
Closed

main() is not called with arguments and does not need arguments. #24

hansendx opened this issue Aug 22, 2019 · 0 comments

Comments

@hansendx
Copy link
Collaborator

Try running

collect_stata

without arguments.

Maybe adding this before args = parser.parse_args() helps?

if args is None:
    parser.print_help()
    sys.exit(1)

main() is not called with arguments and does not need arguments.
try

def main():
    """The main routine."""
    parser = argparse.ArgumentParser(description="Get input and output information")
    parser.add_argument("-i", "--input", help="get input path")
    parser.add_argument("-o", "--output", help="get output path")

    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)

Also see my other comment.
Check if the arguments make sense and give feedback accordingly.

Originally posted by @hansendx in #11 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant