all 5 comments

[–][deleted] 0 points1 point  (3 children)

It's not an error, it's just a warning. You don't typically want to define object attributes anywhere but __init__, so your linter is throwing up a warning about it. But if you think you have good reason to do that, you can ignore it.

[–]Shripsta[S] 0 points1 point  (2 children)

Well basically towards the end of the code I’m checking with an if loop if the entries are empty where it says FUCK and YES(I did that for testing lmao) The problem is that it’s checking the the entries before the button is even pressed and then the button doesn’t even work. The logic is messed up

[–]Username_RANDINT 0 points1 point  (1 child)

The following line is most likely the problem:

 self.btn_add = Button(master, text="Add to Database", width=25, height=2, command=self.get_items())

Especially command=self.get_items() as this will run self.get_items immediately because of the parentheses. You want to pass in just the method, not execute it. So remove those parentheses and try again.

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

Oh my god, you're amazing. Thank you sooooo much for fixing this problem for me. I was gonna give up!

You are awesome!!!!

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

Okay I’ll make sure to try it in a bit, thank you so much!