我正在基于Gooey构建GUI,我想添加一个复选框并将值存储为True / False,但出现错误:
IndexError: list index out of range
这是我用于复选框的代码:
import pandas as pd
from gooey import Gooey, GooeyParser
@Gooey(program_name="DEPRECIATION",navigation='TABBED', header_bg_color = '#6aa2fc',default_size=(710, 700))
def parse_args():
parser = GooeyParser()
parser.add_argument('Useful_Life',
widget='CheckBox',
default = False,
action = "store_true",
help='Calculate depreciation based on Useful years')
args = parser.parse_args()
return args
if __name__ == '__main__':
args = parse_args()
switch1 = args.Useful_Life
print(switch1)
我想念什么吗?