mbakeranalecta / sam

Semantic Authoring Markdown
Other
79 stars 8 forks source link

samparser.py might be using the wrong ArgumentParser #198

Closed ghost closed 5 years ago

ghost commented 5 years ago

When I downloaded the project and ran samparser.py, I got the error that that "the Namespace object has no attribute infile" (line 3800 of samparser.py at if args.infile == args.outfile:).

The problem seems to be that infile is a member of the parsed arguments of the io_parser rather than the argparser, and the problem seemed to be fixed by changing args = argparser.parse_args() to args = io_parser.parse_args()

(It seemed to me that io_parser was in fact supposed to be the main parser, but I don't know enough to know whether that's true)

ghost commented 5 years ago

The issue was that while infile was inherited correctly by both the subparsers, none of them were invoked when samparser.py was invoked with no subcommand.

Fixed by https://github.com/mbakeranalecta/sam/pull/199