[bugfix] using generic python exception AssertionError