generator.py: Fixed Exception messae