Answer the question
In order to leave comments, you need to log in
I want to write a program to calculate time for datetime in tkinter module, but when calculating time, an error is thrown, how to fix it?
Gives the following error:
hour_end = int(enrty_hour_end.get())
ValueError: invalid literal for int() with base 10: ''
def find_interval():
hour_begin = enrty_hour_begin.get()
int(hour_begin)
minute_begin = enrty_minute_begin.get()
int(minute_begin)
hour_end = enrty_hour_end.get()
int(hour_end)
minute_end = enrty_minute_end.get()
int(minute_end)
a = timedelta(hours=hour_begin, minutes=minute_begin)
b = timedelta(hours=hour_end, minutes=minute_end)
c = b-a
lbl_interval.config(text=c)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question