Python Forum
Help in finding ExceptionError
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help in finding ExceptionError
#1
The script is working as expected but, I keep getting the error in the console. I've not been able to silence or correct it.
Any help would be great. Thanks
Error:
Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1886, in __call__ return self.func(*args) TypeError: set() missing 1 required positional argument: 'last' Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1886, in __call__ return self.func(*args) TypeError: set() missing 1 required positional argument: 'last' Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1886, in __call__ return self.func(*args) TypeError: set() missing 1 required positional argument: 'last' Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.8/tkinter/__init__.py", line 1886, in __call__ return self.func(*args) TypeError: set() missing 1 required positional argument: 'last'
Relevant code
class AddRecipe:
    '''doc'''
    def __init__(self):
        pass

    def my_form(self):
        '''docstring'''

# More code .....

        btn_style = ttk.Style()
        btn_style.configure('Submit.TButton')
        submit_btn = ttk.Button(bottom_frame, text='Submit Recipe', style='Submit.TButton', \
        command=partial(self.submit_values, title_entry, ingredients_entry, \
        instructions_entry, prep_time, cook_time))
        submit_btn.grid(column=5, row=0)

    def submit_values(self, title, ingredients, instructions, prep_time, cook_time):
        '''Docstring'''
        if not title.get() or not ingredients.get('1.0', 'end-1c') or not \
        instructions.get('1.0', 'end-1c'):
            messagebox.showerror(title='Input Error', \
            message='Required fields: Title, Ingredients, and Instructions')
            self.top.destroy()
            self.my_form()

        print(title.get())
        print(ingredients.get('1.0', 'end-1c'))
        print(instructions.get('1.0', 'end-1c'))
        print(prep_time.get())
        print(cook_time.get())
        msg = messagebox.askyesno(title='Add Recipe', message='Add another recipe?')
        if msg is True:
            self.top.destroy()
            self.my_form()
        if msg is False:
            self.top.destroy()
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts


Reply


Messages In This Thread
Help in finding ExceptionError - by menator01 - Apr-28-2020, 08:11 PM
RE: Help in finding ExceptionError - by deanhystad - Apr-28-2020, 08:32 PM
RE: Help in finding ExceptionError - by menator01 - Apr-28-2020, 08:40 PM
RE: Help in finding ExceptionError - by deanhystad - Apr-28-2020, 09:01 PM
RE: Help in finding ExceptionError - by menator01 - Apr-28-2020, 09:16 PM
RE: Help in finding ExceptionError - by deanhystad - Apr-28-2020, 09:23 PM
RE: Help in finding ExceptionError - by menator01 - Apr-28-2020, 09:27 PM
RE: Help in finding ExceptionError - by deanhystad - Apr-28-2020, 09:47 PM
RE: Help in finding ExceptionError - by deanhystad - Apr-28-2020, 11:16 PM
RE: Help in finding ExceptionError - by menator01 - Apr-28-2020, 11:21 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020