'numba: underlying object has vanished

I am experiencing the following exception when using Numba.

What does it mean, and how can it be avoided? It occurs in the middle of a convoluted function, so unfortunately I am unable to share a reproducable sample.

self = <weakref at 0x7f1f5b5e4700; dead>

    def __getnewargs__(self):
        obj = self()
        if obj is None:
>           raise ReferenceError("underlying object has vanished")
E           ReferenceError: underlying object has vanished

/home/jon/miniconda3/envs/betfair/lib/python3.8/site-packages/numba/core/types/functions.py:473: ReferenceError


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source