When starting or stopping REVEN’s Project Manager, the following exception is displayed in the terminal, one or more times:
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f2bc24c40d0> Traceback (most recent call last): File "/usr/lib/python3.5/weakref.py", line 117, in remove TypeError: 'NoneType' object is not callable
This behavior is not an issue in REVEN. It is a well known exception (Python issue 29519) that affects the version of Python used in Debian 9 Stretch. When encountered, it means that this particular Python process has leaked some memory, but this won’t impact the successful completion of the operations.
A patch is available for
/usr/lib/python3.5/weakref.py. Since it is a system file, it is not applied by REVEN.
diff --git a/usr/lib/python3.5/weakref.py b/usr/lib/python3.5/weakref.py index c66943f02e24..3e1fb8158069 100644 --- a/usr/lib/python3.5/weakref.py +++ b/usr/lib/python3.5/weakref.py @@ -53,7 +53,7 @@ def __init__(*args, **kw): args = args[1:] if len(args) > 1: raise TypeError('expected at most 1 arguments, got %d' % len(args)) - def remove(wr, selfref=ref(self)): + def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref): self = selfref() if self is not None: if self._iterating: @@ -61,7 +61,7 @@ def remove(wr, selfref=ref(self)): else: # Atomic removal is necessary since this function # can be called asynchronously by the GC - _remove_dead_weakref(self.data, wr.key) + _atomic_removal(self.data, wr.key) self._remove = remove # A list of keys to be removed self._pending_removals =