终端执行 apt updateomv-update 命令以后,刷新源操作成功执行,但是还会显示以下错误:

Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0xb7099d64>
Traceback (most recent call last):
File "/usr/lib/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0xb7099d64>
Traceback (most recent call last):
File "/usr/lib/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable

这是 Python 3.5 的 BUG,与 OpenMediaVault 无关,如果不希望每次都看到这个错误提示,可以修改 /usr/lib/python3.5/weakref.py 文件。

将第109行

def remove(wr, selfref=ref(self)):

替换成

def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):

将117行

_remove_dead_weakref(d, wr.key)

替换成

_atomic_removal(d, wr.key)

补充

我只修改了109行就不再有错误消息,反而同时修改117行还会返回错误。

Reference