r = SHA256(1)
r.randbelow_from_randbits(-1)
r = SHA256(1)
r.randbelow_from_randbits(-1)
Both of these function calls cause kernel errors in jupyterhub, and unlike in the docstring for randbelow_from_randbits, no ValueError is raised if n==0.
I suggest assert n > 0 is added