line 51 error with time.sleep