chriskiehl / Gooey

Turn (almost) any Python command line program into a full GUI application with one line
MIT License
20.68k stars 1.02k forks source link

the second MultiFileChooser get only one file #910

Open JoshuaShi-19 opened 7 months ago

JoshuaShi-19 commented 7 months ago

Win10;Python 3.10;Gooey 1.0.8.1.

my code like this:

@Gooey(language='chinese', program_name=" test", default_size=(1000, 600))
def gui_start():
    parser = GooeyParser(description="test")

    parser.add_argument('pred_files', metavar='pred file path', help='can choose multi file', nargs='+', widget='MultiFileChooser')
    parser.add_argument('train_files', metavar='train file path', help='can choose multi file', nargs='+', widget='MultiFileChooser')
    args = parser.parse_args()
    print(args.pred_files)
    print(args.train_files)

I choose multi files in both parameter,but train_files pint only one file,while pred_files pint multi files. When I interchanged the position of two lines of parameter code like this:

parser.add_argument('train_files', metavar='train file path', help='can choose multi file', nargs='+', widget='MultiFileChooser')
parser.add_argument('pred_files', metavar='pred file path', help='can choose multi file', nargs='+', widget='MultiFileChooser')

pred_files pint only one file,while train_files pint multi files. It looks like the following code is going to be wrong. by the way,my file names has blank space.

elad-eyal commented 6 months ago

i was not able to reproduce

windows 10 wsl2 python 3.10.12 gooey 1.0.8.1