Fixing an update error in OpenMediaVault 4.0
Published on 10th June 2019 Estimated Reading Time: 1 minuteFor a time, I found that executing the command omv-update
in OpenMediaVault 4.0 produced the following Python errors appeared, among other more benign messages:
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
Not wanting a failed update, I decided that I needed to investigate this and found that /usr/lib/python3.5/weakref.py
required the following updates to lines 109 and 117, respectively:
def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
_atomic_removal(d, wr.key)
To be more clear, the line beginning with "def" is how line 109 should appear, while the line beginning with _atomic_removal is how line 117 should appear. Once the required edits were made and the file closed, re-running omv-update
revealed that the problem was fixed and that is how things remain at the time of writing.
Thanks for writing this, I was facing the same issue, the edit is still working. SEP 1, 2019
Thanks. These errors are still displayed and these changes work to fix them.
Thanks, I also fixed the problem using your suggestion.
Great job. Thank you very much....