fixed bug when raise error in options

fixed bug when raise error in options.py file.