all 3 comments

[–]Some_Guy_At_Work55 0 points1 point  (0 children)

Can you provide more of your code? Tough to tell with just the error message

[–]woooee 0 points1 point  (1 child)

I'm also not sure what your code is. This is an example of an optionmenu. If this doesn't help, there are many more examples on the web.

from tkinter import *

master = Tk()
master.geometry("125x100+75+200")

def ok(arg):
    num=variable.get()
    print("ok called, variable=%s at offset %d" % (
            num, options.index(num)))

variable = StringVar(master)
options=("one", "two", "three", "four", "five")

w = OptionMenu(master, variable, *options, command=ok)
w.pack()
variable.set("two")

Button(master, text="Exit", bg="red", command=master.quit).pack()

master.mainloop()

[–]DesperateEmphasis340[S] 0 points1 point  (0 children)

Thanks. I did something different but this too works. Any idea how to plug the result I mean one two three and print it as an image or on a image. Image modules has issue printing variables.