I assume you left out `stacklevel=2` because it doesn't make much sense in this context?