Thanks to SyntaxVoid in the comments I solved this problem.
I created an Entry
in tkinter
for a timer and I want that input to be the variable for how long to set the timer. I need this variable to be an integer instead of a string, but I get this error.
I have seen some posts about this and they all said to make a variable and use get()
and then make that variable an int but this didn't work as you can see.
I believe that this is all the code from the error:
t = Entry()
t.pack()
stringT = t.get()
intT = int(stringT)
The error:
Traceback (most recent call last):
File "C:\Users\Traner\Desktop\Python Files\Scoreboard GUI\scoreboard.py", line 41, in <module>
intT = int(stringT)
ValueError: invalid literal for int() with base 10: ''
I am hoping to get the Entry()
to be an integer instead of a string