In the meantime, you can indeed try to replace the .pyo wirh the .py and then restart deluge. Let us know if it fixes. If it does not, simply reinstall Deluge.
I've renamed torrent.pyo to torrent.pyo.old and copy patched torrent.py. Seems to be worked as expected. Thanks!