This error is a TypeError caused by the debugger (debugpy/pydevd) trying to compare a None
value with an integer. The issue isn’t with your code—it’s happening in the debugger’s function that collects try/except information. The debugger expects a valid line number (an int) but is receiving None
instead. If your code runs fine outside the debugger, you can safely ignore this as a bug in the debugging tool. Updating your debugger or switching to a different one might resolve the issue.