To paraphrase, you will need to wrap statements that will fall short in try out/except as specific as feasible, in quite possibly the most internal-loop as you possibly can. Share Enhance this respond to Adhere to You need the traceback module. It can Permit you to print stack dumps like https://helpmehigh.com/