Handle specific exception from python package
Handle specific exception from python package Question: I would like to handle the following Exception from py_vollib/py_lets_be_rational in specific way. py_lets_be_rational.exceptions.BelowIntrinsicException: The volatility is below the intrinsic value. Tried this without success: from py_vollib.black.implied_volatility import implied_volatility as impl_vol_b from py_lets_be_rational.exceptions import BelowIntrinsicException try: call_vol = impl_vol_b(discounted_option_price, F, K, r, t, type) except BelowIntrinsicException as e: …