Python3.5 报错 'NoneType' object is not callable

错误代码:

Exception ignored in: <function WeakValueDictionary.__init__.<locals>.remove at 0x7f81db3bc730>

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 0x7f81db3bc730>

Traceback (most recent call last):

File "/usr/lib/python3.5/weakref.py", line 117, in remove

TypeError: 'NoneType' object is not callable

解决办法:

nano/usr/lib/python3.5/weakref.py

109行 改def remove(wr, selfref=ref(self), atomicremoval=_remove_dead_weakref):

117行改atomicremoval(d, wr.key)