0

Here are the lists I have:

a1 = [x.getName() for x in containers]
a2 = [x.getName() for x in lids]
a3 = [x.getName() for x in wicks]
a4 = [x.getName() for x in labels]
a5 = [x.getName() for x in misc]

z = []
z.extend(a1)
z.extend(a2)
z.extend(a3)
z.extend(a4)
z.extend(a5)

items = z

Here is the code for the OptionsMenu:

type_selector = OptionMenu(mainframe, add_amount_selector, *items)

When I try to load the program I get an error:

type_selector = OptionMenu(mainfrane, add_amount_selector, *items)
TypeError: __init__() missing 1 required positional argument: 'value'

It's saying that because *items begins empty it's missing an argument. Is there a workaround for this? I know I can put a random value into items and then use items.extend(z), but I'd rather not put an option in the list that I do not want.

cstmxyz
  • 33
  • 3
  • 8

0 Answers0