handle python errors so they dont brake the bridge