Avoid getting an error by checking if the key "Oracle" is in the cast dictionary before removing it.
if
"Oracle"
in
cast
Make sure to type if "Oracle" in cast.
if "Oracle" in cast