removing used code from PYError