Python 3 bug issue with alert