diff --git a/gooey/python_bindings/argparse_to_json.py b/gooey/python_bindings/argparse_to_json.py index b3d7386..3508f7d 100644 --- a/gooey/python_bindings/argparse_to_json.py +++ b/gooey/python_bindings/argparse_to_json.py @@ -45,7 +45,8 @@ def convert(parser): if has_required(actions): raise UnsupportedConfiguration("Gooey doesn't currently support required arguments when subparsers are present.") layout_type = 'column' - layout_data = {name.lower(): process(sub_parser, widget_dict) for name, sub_parser in get_subparser(actions).choices.iteritems()} + layout_data = {name.lower(): process(sub_parser, getattr(sub_parser, 'widgets', {})) + for name, sub_parser in get_subparser(actions).choices.iteritems()} else: layout_type = 'standard' layout_data = process(parser, widget_dict)