Apr-28-2020, 08:11 PM
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
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 codeclass 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
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts