E
E
Emil B-ov2020-06-29 01:44:43
Python
Emil B-ov, 2020-06-29 01:44:43

When trying to convert Entry to Int, it gives an error invalid literal for int() with base 10: '' How to fix?

Hello, I want to make a calculator that will calculate the data of a Rectangular Triangle
. But I get an error when converting the Entry type to the Int type.
What should I do?
5ef91d4f5ba85269913623.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2020-06-29
@emilbudagov

Your function is called before you enter a value.
try is not used
You can try at least like this:

Button1=Button(text="Вычислить второй катет треугольника", command=Lambda:but1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question