Apparently, pywinauto is throwing TimeOut but not being caught by the exception.
One option is to import TimeOutError from the pywinauto module to ensure the except block catches an exception correctly, like this:
import pywinauto.timings
for _ in range(60):
try:
...
except pywinauto.timings.TimeoutError:
print('Timeout error')
continue
Also, evaluate the need to break it inside the try, check if it can’t be disturbing in this case, or if it might not be more interesting to put it outside the try, in else one for example.